From 2f0cb2a32bfee90cda4fad98990a2afec5fe0143 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Tue, 5 Jul 2016 23:12:28 -0700 Subject: [PATCH] remove the tests/*.status files The tests/*.status files aren't useful so eliminate them. Just verify whether a given test module exited with a success status. There isn't any point in having a "status" file that indicates the test module should exit with a success (zero) status. Closes #3208 Closes #3209 --- tests/abbr.status | 1 - tests/bind.expect.status | 1 - tests/commandline.expect.status | 1 - tests/expansion.status | 1 - tests/fish_realpath.status | 1 - tests/fkr.expect.status | 1 - tests/function.status | 1 - tests/generic.expect.status | 1 - tests/indent.status | 1 - tests/interactive.fish | 9 ++++----- tests/jobs.in | 3 ++- tests/jobs.status | 1 - tests/line-continuation.status | 1 - tests/locale.status | 1 - tests/math.status | 1 - tests/printf.status | 1 - tests/read.expect.status | 1 - tests/read.status | 1 - tests/status.status | 1 - tests/string.status | 1 - tests/test.fish | 9 ++++----- tests/test1.status | 1 - tests/test2.status | 1 - tests/test3.status | 1 - tests/test4.status | 1 - tests/test5.status | 1 - tests/test6.status | 1 - tests/test7.status | 1 - tests/test8.status | 1 - tests/test9.in | 2 -- tests/test9.status | 1 - 31 files changed, 10 insertions(+), 40 deletions(-) delete mode 100644 tests/abbr.status delete mode 100644 tests/bind.expect.status delete mode 100644 tests/commandline.expect.status delete mode 100644 tests/expansion.status delete mode 100644 tests/fish_realpath.status delete mode 100644 tests/fkr.expect.status delete mode 100644 tests/function.status delete mode 100644 tests/generic.expect.status delete mode 100644 tests/indent.status delete mode 100644 tests/jobs.status delete mode 100644 tests/line-continuation.status delete mode 100644 tests/locale.status delete mode 100644 tests/math.status delete mode 100644 tests/printf.status delete mode 100644 tests/read.expect.status delete mode 100644 tests/read.status delete mode 100644 tests/status.status delete mode 100644 tests/string.status delete mode 100644 tests/test1.status delete mode 100644 tests/test2.status delete mode 100644 tests/test3.status delete mode 100644 tests/test4.status delete mode 100644 tests/test5.status delete mode 100644 tests/test6.status delete mode 100644 tests/test7.status delete mode 100644 tests/test8.status delete mode 100644 tests/test9.status diff --git a/tests/abbr.status b/tests/abbr.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/abbr.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/bind.expect.status b/tests/bind.expect.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/bind.expect.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/commandline.expect.status b/tests/commandline.expect.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/commandline.expect.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/expansion.status b/tests/expansion.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/expansion.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/fish_realpath.status b/tests/fish_realpath.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/fish_realpath.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/fkr.expect.status b/tests/fkr.expect.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/fkr.expect.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/function.status b/tests/function.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/function.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/generic.expect.status b/tests/generic.expect.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/generic.expect.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/indent.status b/tests/indent.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/indent.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/interactive.fish b/tests/interactive.fish index 76b0562e3..8f386f8b7 100644 --- a/tests/interactive.fish +++ b/tests/interactive.fish @@ -33,7 +33,7 @@ function test_file set -lx TERM dumb expect -n -c 'source interactive.expect.rc' -f $file >$file.tmp.out ^$file.tmp.err end - set -l tmp_status $status + set -l exit_status $status set -l res ok mv -f interactive.tmp.log $file.tmp.log @@ -41,9 +41,8 @@ function test_file set -l out_status $status diff $file.tmp.err $file.err >/dev/null set -l err_status $status - set -l exp_status (cat $file.status)[1] - if test $out_status -eq 0 -a $err_status -eq 0 -a $exp_status -eq $tmp_status + if test $out_status -eq 0 -a $err_status -eq 0 -a $exit_status -eq 0 say green "ok" # clean up tmp files rm -f $file.tmp.{err,out,log} @@ -58,9 +57,9 @@ function test_file say yellow "Error output differs for file $file. Diff follows:" colordiff -u $file.tmp.err $file.err end - if test $exp_status -ne $tmp_status + if test $exit_status -ne 0 say yellow "Exit status differs for file $file." - echo "Expected $exp_status, got $tmp_status." + echo "Unexpected test exit status $exit_status." end if set -q SHOW_INTERACTIVE_LOG # dump the interactive log diff --git a/tests/jobs.in b/tests/jobs.in index 14ed51819..ad0b002e7 100644 --- a/tests/jobs.in +++ b/tests/jobs.in @@ -2,4 +2,5 @@ sleep 1 & sleep 1 & jobs -c bg 3 -fg 3 \ No newline at end of file +fg 3 +or exit 0 diff --git a/tests/jobs.status b/tests/jobs.status deleted file mode 100644 index 56a6051ca..000000000 --- a/tests/jobs.status +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/tests/line-continuation.status b/tests/line-continuation.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/line-continuation.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/locale.status b/tests/locale.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/locale.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/math.status b/tests/math.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/math.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/printf.status b/tests/printf.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/printf.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/read.expect.status b/tests/read.expect.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/read.expect.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/read.status b/tests/read.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/read.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/status.status b/tests/status.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/status.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/string.status b/tests/string.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/string.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test.fish b/tests/test.fish index 0af92413a..005968af3 100644 --- a/tests/test.fish +++ b/tests/test.fish @@ -25,16 +25,15 @@ function test_file echo -n "Testing file $file ... " ../test/root/bin/fish <$file >$base.tmp.out ^$base.tmp.err - set -l tmp_status $status + set -l exit_status $status set -l res ok diff $base.tmp.out $base.out >/dev/null set -l out_status $status diff $base.tmp.err $base.err >/dev/null set -l err_status $status - set -l exp_status (cat $base.status)[1] - if test $out_status -eq 0 -a $err_status -eq 0 -a $exp_status -eq $tmp_status + if test $out_status -eq 0 -a $err_status -eq 0 -a $exit_status -eq 0 say green "ok" # clean up tmp files rm -f $base.tmp.{err,out} @@ -49,9 +48,9 @@ function test_file say yellow "Error output differs for file $file. Diff follows:" colordiff -u $base.tmp.err $base.err end - if test $exp_status -ne $tmp_status + if test $exit_status -ne 0 say yellow "Exit status differs for file $file." - echo "Expected $exp_status, got $tmp_status." + echo "Unexpected test exit status $exit_status." end return 1 end diff --git a/tests/test1.status b/tests/test1.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test1.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test2.status b/tests/test2.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test2.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test3.status b/tests/test3.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test3.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test4.status b/tests/test4.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test4.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test5.status b/tests/test5.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test5.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test6.status b/tests/test6.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test6.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test7.status b/tests/test7.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test7.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test8.status b/tests/test8.status deleted file mode 100644 index 573541ac9..000000000 --- a/tests/test8.status +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/tests/test9.in b/tests/test9.in index 0643354fe..789d93f74 100644 --- a/tests/test9.in +++ b/tests/test9.in @@ -145,5 +145,3 @@ end # Comments abutting text (#953) echo not#a#comment echo is # a # comment - -false diff --git a/tests/test9.status b/tests/test9.status deleted file mode 100644 index d00491fd7..000000000 --- a/tests/test9.status +++ /dev/null @@ -1 +0,0 @@ -1