diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-12-26 00:41:37 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-05 15:30:49 +0300 |
commit | 30b7cad6fb2fc6a5d01cdc8e68c4f37f5da251b9 (patch) | |
tree | c7c9879f5d3ed7206ab522b8e2234dcab7c5cddf /tests/test/script | |
parent | 3ecbf5d51b13e11a93ae5757408a27c21d804c9f (diff) |
Save diff output for {stdout,stderr}.diff
Diffstat (limited to 'tests/test/script')
-rw-r--r-- | tests/test/script/runner/redirect.test | 51 | ||||
-rw-r--r-- | tests/test/script/runner/status.test | 13 |
2 files changed, 47 insertions, 17 deletions
diff --git a/tests/test/script/runner/redirect.test b/tests/test/script/runner/redirect.test index ec3c960..7aa4ec0 100644 --- a/tests/test/script/runner/redirect.test +++ b/tests/test/script/runner/redirect.test @@ -44,13 +44,16 @@ $b : $c <'$* -i 1 <foo >bar'; $b 2>>~%EOE% != 0 -%.{3} --bar -+foo %testscript:1: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(\.exe)? stdout doesn't match the expected output% % info: stdout: test[/\\]1[/\\]stdout% % info: expected stdout: test[/\\]1[/\\]stdout\.orig% +% info: stdout diff: test[/\\]1[/\\]stdout\.diff% % info: stdin: test[/\\]1[/\\]stdin% +%--- .*% +%\+\+\+ .*% +%@@ .*% +-bar ++foo EOE : inerr-str @@ -141,6 +144,28 @@ EOO EOI $b +: doc-fail-largediff +: +: Make sure that the large (>4KB) expected/real output difference is not +: printed as a part of diagnostics. +: +$c <<EOI; +s="------------------------------------------------------------------------"; +s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s"; +$* -i 1 <<"EOF" >>"EOO" +$s +EOF +x$s +EOO +EOI +$b 2>>~%EOE% != 0 +%testscript:3: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(\.exe)? stdout doesn't match the expected output% +% info: stdout: test[/\\]1[/\\]stdout% +% info: expected stdout: test[/\\]1[/\\]stdout\.orig% +% info: stdout diff: test[/\\]1[/\\]stdout\.diff% +% info: stdin: test[/\\]1[/\\]stdin% +EOE + # No-newline tests. # : no-newline-str @@ -157,24 +182,22 @@ $b : $c <'$* -i 1 <:"foo" >"foo"'; $b 2>>~/EOE/ != 0 -/.{3} +/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ +/.{7} -foo +foo \ No newline at end of file -/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ -/.{3} EOE : no-newline-str-fail2 : $c <'$* -i 1 <"foo" >:"foo"'; $b 2>>~/EOE/ != 0 -/.{3} +/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ +/.{7} -foo \ No newline at end of file +foo -/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ -/.{3} EOE : no-newline-doc @@ -198,12 +221,11 @@ foo EOO EOI $b 2>>~/EOE/ != 0 -/.{3} +/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ +/.{7} -foo +foo \ No newline at end of file -/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ -/.{3} EOE : no-newline-doc-fail2 @@ -216,12 +238,11 @@ foo EOO EOI $b 2>>~/EOE/ != 0 -/.{3} +/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ +/.{7} -foo \ No newline at end of file +foo -/testscript:1: error: .+driver(\.exe)? stdout doesn't match the expected output/ -/.{3} EOE : no-newline-empty-str-doc diff --git a/tests/test/script/runner/status.test b/tests/test/script/runner/status.test index 6a2c06c..fc0edff 100644 --- a/tests/test/script/runner/status.test +++ b/tests/test/script/runner/status.test @@ -24,12 +24,21 @@ $b : $c <'$* -s 1 == 0'; $b 2>>~%EOE% != 0 -%testscript:1: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(.exe)? exit status 1 != 0% +%testscript:1: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(\.exe)? exit status 1 != 0% EOE : ne-false : $c <'$* -s 1 != 1'; $b 2>>~%EOE% != 0 -%testscript:1: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(.exe)? exit status 1 == 1% +%testscript:1: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(\.exe)? exit status 1 == 1% +EOE + +: error +: +$c <'$* -s 1 -e "Error"'; +$b 2>>~%EOE% != 0 +%testscript:1: error: \.\.[/\\]\.\.[/\\]\.\.[/\\]driver(\.exe)? exit status 1 != 0% +% info: stderr: test[/\\]1[/\\]stderr% +Error EOE |