File 0155-escript_SUITE-handle-errors-printed-to-stderr.patch of Package erlang

From 99cea2058615b984010276975243ca468e5e43b7 Mon Sep 17 00:00:00 2001
From: Mikael Pettersson <mikpelinux@gmail.com>
Date: Sat, 12 Sep 2020 18:34:46 +0200
Subject: [PATCH 5/9] escript_SUITE: handle errors printed to stderr

also adjust bad_io_server TC for less quoting in error message
---
 lib/stdlib/test/escript_SUITE.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/stdlib/test/escript_SUITE.erl b/lib/stdlib/test/escript_SUITE.erl
index 031aeaa527..c9758009a8 100644
--- a/lib/stdlib/test/escript_SUITE.erl
+++ b/lib/stdlib/test/escript_SUITE.erl
@@ -956,9 +956,9 @@ bad_io_server(Config) when is_list(Config) ->
     Data = proplists:get_value(data_dir, Config),
     Dir = filename:absname(Data),		%Get rid of trailing slash.
     run(Dir, "bad_io_server",
-        [<<"\"escript: exception error: an error occurred when evaluating"
-           " an arithmetic expression\\n  in operator  '/'/2\\n     "
-           "called as '\\x{400}' / 0\\n\"\r\nExitCode:127">>]),
+        [<<"escript: exception error: an error occurred when evaluating"
+           " an arithmetic expression\n  in operator  '/'/2\n     "
+           "called as '\\x{400}' / 0\nExitCode:127">>]),
     ok.
 
 run(Dir, Cmd0, Expected0) ->
@@ -982,7 +982,7 @@ do_run(Dir, Cmd, Expected0) ->
 
     Env = [{"PATH",Dir++":"++os:getenv("PATH")},
            {"ERL_FLAGS",false},{"ERL_AFLAGS",false}],
-    Port = open_port({spawn,Cmd}, [exit_status,eof,in,{env,Env}]),
+    Port = open_port({spawn,Cmd}, [stderr_to_stdout,exit_status,eof,in,{env,Env}]),
     Res = get_data(Port, []),
     receive
 	{Port,{exit_status,ExitCode}} ->
-- 
2.26.2

openSUSE Build Service is sponsored by