From 7fdc55efe423f58e5ce03e7f758ace6443800b7a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 5 Jun 2020 20:06:06 +0300 Subject: Cleanup script command failure diagnostics --- tests/test/script/runner/exit.testscript | 2 +- tests/test/script/runner/pipe.testscript | 2 +- tests/test/script/runner/set.testscript | 2 +- tests/test/script/runner/status.testscript | 9 +++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'tests/test/script/runner') diff --git a/tests/test/script/runner/exit.testscript b/tests/test/script/runner/exit.testscript index 200b963..24e51fa 100644 --- a/tests/test/script/runner/exit.testscript +++ b/tests/test/script/runner/exit.testscript @@ -54,7 +54,7 @@ empty_id = '' : exit-code : $c <'exit != 0' && $b 2>>EOE != 0 - testscript:1:1: error: exit builtin exit code cannot be non-zero + testscript:1:1: error: exit builtin exit code cannot be checked info: test id: 1 EOE } diff --git a/tests/test/script/runner/pipe.testscript b/tests/test/script/runner/pipe.testscript index 8fecbfc..205fd55 100644 --- a/tests/test/script/runner/pipe.testscript +++ b/tests/test/script/runner/pipe.testscript @@ -16,7 +16,7 @@ $c <'$* -o foo | cat >foo' && $b : process-to-builtin : exit-code : $c <'$* -o foo -s 1 | $* -i 1 >foo -s 2' && $b 2>>/~%EOE% != 0 - %testscript:1:1: error: .+ exit code 2 != 0% + %testscript:1:1: error: .+ exited with code 2% info: stdout: test/1/stdout-2 info: test id: 1 EOE diff --git a/tests/test/script/runner/set.testscript b/tests/test/script/runner/set.testscript index dcf428d..9219cbb 100644 --- a/tests/test/script/runner/set.testscript +++ b/tests/test/script/runner/set.testscript @@ -34,7 +34,7 @@ : status : $c <'set foo == 1' && $b 2>>EOE != 0 - testscript:1:1: error: set builtin exit code cannot be non-zero + testscript:1:1: error: set builtin exit code cannot be checked info: test id: 1 EOE } diff --git a/tests/test/script/runner/status.testscript b/tests/test/script/runner/status.testscript index d4759e3..e4586d9 100644 --- a/tests/test/script/runner/status.testscript +++ b/tests/test/script/runner/status.testscript @@ -38,6 +38,15 @@ b += --no-column : error : $c <'$* -s 1 -e "Error"' && $b 2>>/~%EOE% != 0 +%testscript:1: error: ../../../driver(.exe)? exited with code 1% + info: stderr: test/1/stderr +Error + info: test id: 1 +EOE + +: error-check +: +$c <'$* -s 1 -e "Error" == 0' && $b 2>>/~%EOE% != 0 %testscript:1: error: ../../../driver(.exe)? exit code 1 != 0% info: stderr: test/1/stderr Error -- cgit v1.1