diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-02 14:19:30 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-02 16:09:47 +0300 |
commit | d1ab8f029560057dd17d853f2ffa4dd92780e23a (patch) | |
tree | 779c8e4cf9e1baeb9fb832eac1dd8b5a0b541c65 /tests | |
parent | 2017c59a4a68a179e0eadc0183f0138e7964835e (diff) |
Cleanup testscript runner diagnostics
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test/script/builtin/sed.test | 32 | ||||
-rw-r--r-- | tests/test/script/runner/expr.test | 2 | ||||
-rw-r--r-- | tests/test/script/runner/pipe.test | 4 | ||||
-rw-r--r-- | tests/test/script/runner/redirect.test | 36 | ||||
-rw-r--r-- | tests/test/script/runner/regex.test | 10 | ||||
-rw-r--r-- | tests/test/script/runner/set.test | 8 | ||||
-rw-r--r-- | tests/test/script/runner/status.test | 6 |
7 files changed, 46 insertions, 52 deletions
diff --git a/tests/test/script/builtin/sed.test b/tests/test/script/builtin/sed.test index dbd70c4..5f3a31e 100644 --- a/tests/test/script/builtin/sed.test +++ b/tests/test/script/builtin/sed.test @@ -20,7 +20,7 @@ : missed : $c <'sed' && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: missing script EOE @@ -28,7 +28,7 @@ : missed-val : $c <'sed -e' && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: missing script EOE @@ -36,7 +36,7 @@ : empty : $c <"sed -e ''" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: empty script EOE @@ -44,7 +44,7 @@ : multiple : $c <"sed -e 's/a//' -e 's/a//'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: multiple scripts EOE @@ -52,7 +52,7 @@ : invalid : $c <"sed -e 'z'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: only 's' command supported EOE @@ -83,7 +83,7 @@ : not-exist : $c <"sed -e 's/foo/bar/' f" && $b 2>>/~%EOE% != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr %sed: unable to edit '.+/1/f': .+% EOE @@ -91,7 +91,7 @@ : empty : $c <"sed -e 's/foo/bar/' ''" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: invalid path '' EOE @@ -100,7 +100,7 @@ : unexpected : $c <"sed -e 's/a//' a b" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: unexpected argument EOE @@ -121,7 +121,7 @@ : none : $c <"sed -e 's'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: no delimiter for 's' command EOE @@ -129,7 +129,7 @@ : invalid : $c <"sed -e 's\\'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: invalid delimiter for 's' command EOE @@ -141,7 +141,7 @@ : unterminated : $c <"sed -e 's/foo'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: unterminated 's' command regex EOE @@ -149,7 +149,7 @@ : empty : $c <"sed -e 's///'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: empty regex in 's' command EOE @@ -160,7 +160,7 @@ : regex errors. For example '*' is parsed successfully. : $c <"sed -e 's/foo[/bar/'" && $b 2>>/~%EOE% != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr %sed: invalid regex.*% EOE @@ -169,7 +169,7 @@ : unterminated-replacement : $c <"sed -e 's/foo/bar'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: unterminated 's' command replacement EOE @@ -177,7 +177,7 @@ : invalid-flags : $c <"sed -e 's/foo/bar/a'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: invalid 's' command flag 'a' EOE @@ -304,7 +304,7 @@ : no-file : $c <"sed -i -e 's/a/b/'" && $b 2>>/EOE != 0 - testscript:1:1: error: sed exit status 1 != 0 + testscript:1:1: error: sed exit code 1 != 0 info: stderr: test/1/stderr sed: -i option specified while reading from stdin EOE diff --git a/tests/test/script/runner/expr.test b/tests/test/script/runner/expr.test index 454da1e..2ccbaa9 100644 --- a/tests/test/script/runner/expr.test +++ b/tests/test/script/runner/expr.test @@ -21,7 +21,7 @@ true = '$* >| -o' false = '$* -s 1 >| -o' - bf = $b 2>/~'%.+/driver(\.exe)? exit status 1 != 0%' + bf = $b 2>/~'%.+/driver(\.exe)? exit code 1 != 0%' : true : diff --git a/tests/test/script/runner/pipe.test b/tests/test/script/runner/pipe.test index bfbe8cb..5e1ada8 100644 --- a/tests/test/script/runner/pipe.test +++ b/tests/test/script/runner/pipe.test @@ -17,14 +17,14 @@ $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 status 2 != 0% + %testscript:1:1: error: .+ exit code 2 != 0% info: stdout: test/1/stdout-2 EOE : stderr : $c <'$* -o foo -e foo 2>bar | $* -i 2 2>baz' && $b 2>>/~%EOE% != 0 - %testscript:1:1: error: .+ stderr doesn't match the expected output% + %testscript:1:1: error: .+ stderr doesn't match expected% info: stderr: test/1/stderr-2 info: expected stderr: test/1/stderr-2.orig info: stderr diff: test/1/stderr-2.diff diff --git a/tests/test/script/runner/redirect.test b/tests/test/script/runner/redirect.test index 7c7fada..cc3989c 100644 --- a/tests/test/script/runner/redirect.test +++ b/tests/test/script/runner/redirect.test @@ -41,33 +41,27 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : out : $c <'$* -o foo >!' && $b >foo 2>>/~%EOE% - %test .+ with .+ on .+% + %test .+% mkdir test/ cd test/ mkdir test/1/ cd test/1/ %.*/driver(.exe)? -o foo% - rm test/1/stderr - rm test/1/ cd test/ - rm test/ cd ./ EOE : err : $c <'$* -e foo 2>!' && $b 2>>/~%EOE% - %test .+ with .+ on .+% + %test .+% mkdir test/ cd test/ mkdir test/1/ cd test/1/ %.*/driver(.exe)? -e foo% foo - rm test/1/stdout - rm test/1/ cd test/ - rm test/ cd ./ EOE } @@ -87,7 +81,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : inout-fail : $c <'$* -i 1 <foo >bar' && $b 2>>/~%EOE%d != 0 - %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the expected output% + %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match expected% info: stdout: test/1/stdout info: expected stdout: test/1/stdout.orig info: stdout diff: test/1/stdout.diff @@ -108,7 +102,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : no-newline-fail1 : $c <'$* -i 1 <:"foo" >"foo"' && $b 2>>~/EOE/ != 0 - /testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ + /testscript:1: error: .+driver(\.exe)? stdout doesn't match expected/ /.{7} -foo +foo @@ -118,7 +112,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : no-newline-fail2 : $c <'$* -i 1 <"foo" >:"foo"' && $b 2>>~/EOE/ != 0 - /testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ + /testscript:1: error: .+driver(\.exe)? stdout doesn't match expected/ /.{7} -foo \ No newline at end of file @@ -156,7 +150,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : mismatch : $c <'$* -o fooo >~/Foo?/i' && $b 2>>/~%EOE%d != 0 - %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the regex% + %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match regex% info: stdout: test/1/stdout info: stdout regex: test/1/stdout.regex fooo @@ -171,7 +165,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : newline : $c <"\$* -i 1 <'foo' >/~%bar/%" && $b 2>>/~%EOE%d != 0; - %testscript:1: error: ../../../../../../driver(.exe)? stdout doesn't match the regex% + %testscript:1: error: ../../../../../../driver(.exe)? stdout doesn't match regex% info: stdout: test/1/stdout info: stdout regex: test/1/stdout.regex info: stdin: test/1/stdin @@ -182,7 +176,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. : no-newline : $c <"\$* -i 1 <'foo' >:/~%bar/%" && $b 2>>/~%EOE%d != 0; - %testscript:1: error: ../../../../../../driver(.exe)? stdout doesn't match the regex% + %testscript:1: error: ../../../../../../driver(.exe)? stdout doesn't match regex% info: stdout: test/1/stdout info: stdout regex: test/1/stdout.regex info: stdin: test/1/stdin @@ -296,7 +290,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. foo EOO EOI - /testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ + /testscript:1: error: .+driver(\.exe)? stdout doesn't match expected/ /.{7} -foo +foo @@ -312,7 +306,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. foo EOO EOI - /testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ + /testscript:1: error: .+driver(\.exe)? stdout doesn't match expected/ /.{7} -foo \ No newline at end of file @@ -364,7 +358,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. x$s EOO EOI - %testscript:3: error: ../../../../../driver(.exe)? stdout doesn't match the expected output% + %testscript:3: error: ../../../../../driver(.exe)? stdout doesn't match expected% info: stdout: test/1/stdout info: expected stdout: test/1/stdout.orig info: stdout diff: test/1/stdout.diff @@ -439,7 +433,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. bar EOO EOI - %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the regex% + %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match regex% info: stdout: test/1/stdout info: stdout regex: test/1/stdout.regex foo @@ -452,9 +446,9 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. bar EOO EOI - %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the regex% + %testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match regex% info: stdout: test/1/stdout - info: stdout regex: test/1/stdout.regex~i + info: stdout regex: test/1/stdout.regex-i foo EOE } @@ -490,7 +484,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. $* -o foo >=out; $* -o bar >>>out EOI - %testscript:2: error: ../../../../../driver(.exe)? stdout doesn't match the expected output% + %testscript:2: error: ../../../../../driver(.exe)? stdout doesn't match expected% info: stdout: test/1/stdout-2 info: expected stdout: test/1/out info: stdout diff: test/1/stdout-2.diff diff --git a/tests/test/script/runner/regex.test b/tests/test/script/runner/regex.test index e0ef1c9..964b961 100644 --- a/tests/test/script/runner/regex.test +++ b/tests/test/script/runner/regex.test @@ -40,7 +40,7 @@ : no-match : $c <'cat <foo >~/bar/' && $b 2>>/EOE != 0 - testscript:1:1: error: cat stdout doesn't match the regex + testscript:1:1: error: cat stdout doesn't match regex info: stdout: test/1/stdout info: stdout regex: test/1/stdout.regex info: stdin: test/1/stdin @@ -165,7 +165,7 @@ foo EOO EOI - testscript:1:1: error: cat stdout doesn't match the regex + testscript:1:1: error: cat stdout doesn't match regex info: stdout: test/1/stdout info: stdout regex: test/1/stdout.regex info: stdin: test/1/stdin @@ -200,7 +200,7 @@ : Syntax dot becomes escaped dot and matches only '.' and so we fail. : $c <'cat <fio >~/f.o/d' && $b 2>>~/EOE/ != 0 - testscript:1:1: error: cat stdout doesn't match the regex + testscript:1:1: error: cat stdout doesn't match regex /.+ EOE } @@ -237,7 +237,7 @@ /f.o/d EOO EOI - testscript:1:1: error: cat stdout doesn't match the regex + testscript:1:1: error: cat stdout doesn't match regex /.+ EOE } @@ -271,7 +271,7 @@ /f.o/ EOO EOI - testscript:1:1: error: cat stdout doesn't match the regex + testscript:1:1: error: cat stdout doesn't match regex /.+ EOE } diff --git a/tests/test/script/runner/set.test b/tests/test/script/runner/set.test index 7c24669..aebe9cb 100644 --- a/tests/test/script/runner/set.test +++ b/tests/test/script/runner/set.test @@ -10,7 +10,7 @@ : pipelining : $c <'set foo | cat >bar' && $b 2>>EOE != 0 - testscript:1:1: error: set builtin must be the last command in a pipe + testscript:1:1: error: set builtin must be the last pipe command EOE : redirecting @@ -19,20 +19,20 @@ : stdout : $c <'set foo >bar' && $b 2>>EOE != 0 - testscript:1:1: error: set builtin stdout must not be redirected + testscript:1:1: error: set builtin stdout cannot be redirected EOE : stderr : $c <'set foo 2>bar' && $b 2>>EOE != 0 - testscript:1:1: error: set builtin stderr must not be redirected + testscript:1:1: error: set builtin stderr cannot be redirected EOE } : status : $c <'set foo == 1' && $b 2>>EOE != 0 - testscript:1:1: error: set builtin exit status must not be other than zero + testscript:1:1: error: set builtin exit code cannot be non-zero EOE } diff --git a/tests/test/script/runner/status.test b/tests/test/script/runner/status.test index 67ce3ae..87c80e1 100644 --- a/tests/test/script/runner/status.test +++ b/tests/test/script/runner/status.test @@ -16,7 +16,7 @@ b += --no-column : false : $c <'$* -s 1 == 0' && $b 2>>/~%EOE%d != 0 - %testscript:1: error: ../../../../driver(.exe)? exit status 1 != 0% + %testscript:1: error: ../../../../driver(.exe)? exit code 1 != 0% EOE } @@ -30,14 +30,14 @@ b += --no-column : false : $c <'$* -s 1 != 1' && $b 2>>/~%EOE% != 0 - %testscript:1: error: ../../../../driver(.exe)? exit status 1 == 1% + %testscript:1: error: ../../../../driver(.exe)? exit code 1 == 1% EOE } : error : $c <'$* -s 1 -e "Error"' && $b 2>>/~%EOE% != 0 -%testscript:1: error: ../../../driver(.exe)? exit status 1 != 0% +%testscript:1: error: ../../../driver(.exe)? exit code 1 != 0% info: stderr: test/1/stderr Error EOE |