File 0232-stdlib-re_SUITE-code-cleaning.patch of Package erlang

From 9d04edd153666f08a068a10f2cbc84df0221d3c2 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Mon, 15 Dec 2025 16:53:17 +0100
Subject: [PATCH 2/5] stdlib: re_SUITE code cleaning

---
 lib/stdlib/test/run_pcre_tests.erl | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/lib/stdlib/test/run_pcre_tests.erl b/lib/stdlib/test/run_pcre_tests.erl
index 5327d3c9c2..8639e48e4d 100644
--- a/lib/stdlib/test/run_pcre_tests.erl
+++ b/lib/stdlib/test/run_pcre_tests.erl
@@ -188,7 +188,7 @@ press([H|T]) ->
 
 testrun(_,_,_,[],_,_,_) ->
     0;
-testrun(ReFun, RE,P,[{Chal,Line,ExecOpt,Responses}|T],EO,Xopt0,XMode) ->
+testrun(ReFun, RE,P,[{Chal,Line,ExecOpt,Responses}|Rest],EO,Xopt0,XMode) ->
     Global = case lists:member(g, EO) of true -> [global]; false -> [] end,
     ReturnType = if ReFun =:= run -> [{capture,all,XMode}];
                     true -> [{return,XMode}] end,
@@ -256,15 +256,22 @@ testrun(ReFun, RE,P,[{Chal,Line,ExecOpt,Responses}|T],EO,Xopt0,XMode) ->
 	
     case compare_sloppy(Res,Responses) of
 	true ->
-	    testrun(ReFun, RE,P,T,EO,Xopt0,XMode);
+	    testrun(ReFun, RE,P,Rest,EO,Xopt0,XMode);
 	false ->
-        case ReFun of
-	        run -> io:format("~s: FAIL(~w): re = ~p, ~nmatched against = ~p(~w), ~nwith options = ~p. ~nexpected = ~p, ~ngot = ~p~n",
-		      [get(testfile), Line,RE,Chal,binary_to_list(Chal),used_options(),Responses,Res]);
-            {replace, Repl} -> io:format("~s: FAIL(~w): re = ~p, ~nmatched against = ~p(~w), ~nreplace with: ~p, ~nwith options = ~p. ~nexpected = ~p, ~ngot = ~p~n",
-                [get(testfile), Line,RE,Chal,binary_to_list(Chal),Repl,used_options(),Responses,Res])
-        end,
-	    case get(error_limit) of
+            case ReFun of
+                run ->
+                    io:format("~s: FAIL(~w): re = ~p, ~nmatched against = ~p(~w), ~n"
+                              "with options = ~p. ~nexpected = ~p, ~ngot = ~p~n",
+                              [get(testfile), Line,RE,Chal,binary_to_list(Chal),
+                               used_options(),Responses,Res]);
+
+                {replace, Repl} ->
+                    io:format("~s: FAIL(~w): re = ~p, ~nmatched against = ~p(~w), ~n"
+                              "replace with: ~p, ~nwith options = ~p. ~nexpected = ~p, ~ngot = ~p~n",
+                              [get(testfile), Line,RE,Chal,binary_to_list(Chal),
+                               Repl,used_options(),Responses,Res])
+            end,
+            case get(error_limit) of
 		infinite -> ok;
 		X ->
 		    case X-1 of
-- 
2.51.0

openSUSE Build Service is sponsored by