From 30b7cad6fb2fc6a5d01cdc8e68c4f37f5da251b9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 26 Dec 2016 00:41:37 +0300 Subject: Save diff output for {stdout,stderr}.diff --- tests/test/script/runner/redirect.test | 51 ++++++++++++++++++++++++---------- tests/test/script/runner/status.test | 13 +++++++-- 2 files changed, 47 insertions(+), 17 deletions(-) (limited to 'tests/test/script/runner') 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 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 <>"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 -- cgit v1.1