diff --git a/tests.old/urchin exit code/non zero exit code when a test fails b/tests.old/urchin exit code/non zero exit code when a test fails deleted file mode 100755 index e34eeff..0000000 --- a/tests.old/urchin exit code/non zero exit code when a test fails +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# Borrow this test which has a failure in it (3 in fact), and -# run it using urchin: -../../urchin "../Counts should be kept of successes and failures./.test" > /dev/null - -# Now invert the result, we want _this_ test to fail if the exit -# code was 0. -case $? in - 0) exit 8;; - *) exit 0;; -esac - diff --git a/tests.old/urchin exit code/zero exit code when tests all pass b/tests.old/urchin exit code/zero exit code when tests all pass deleted file mode 100755 index 5e85ba0..0000000 --- a/tests.old/urchin exit code/zero exit code when tests all pass +++ /dev/null @@ -1 +0,0 @@ -../../urchin .test > /dev/null diff --git a/tests/Exit codes/.test/This test fails b/tests/Exit codes/.test/This test fails new file mode 100755 index 0000000..c508d53 --- /dev/null +++ b/tests/Exit codes/.test/This test fails @@ -0,0 +1 @@ +false diff --git a/tests.old/urchin exit code/.test/This test passes b/tests/Exit codes/.test/This test passes similarity index 100% rename from tests.old/urchin exit code/.test/This test passes rename to tests/Exit codes/.test/This test passes diff --git a/tests/Exit codes/.test/This test skips b/tests/Exit codes/.test/This test skips new file mode 100644 index 0000000..e69de29 diff --git a/tests/Exit codes/0 when all tests pass b/tests/Exit codes/0 when all tests pass new file mode 100755 index 0000000..b095cbd --- /dev/null +++ b/tests/Exit codes/0 when all tests pass @@ -0,0 +1 @@ +$TEST_SHELL ../../urchin '.test/This test passes' diff --git a/tests/Exit codes/0 when all tests skip b/tests/Exit codes/0 when all tests skip new file mode 100755 index 0000000..019abc4 --- /dev/null +++ b/tests/Exit codes/0 when all tests skip @@ -0,0 +1 @@ +$TEST_SHELL ../../urchin '.test/This test skips' diff --git a/tests/Exit codes/1 when any test fails b/tests/Exit codes/1 when any test fails new file mode 100755 index 0000000..02b60ed --- /dev/null +++ b/tests/Exit codes/1 when any test fails @@ -0,0 +1,2 @@ +$TEST_SHELL ../../urchin '.test/This test passes' +test $? -eq 1 diff --git a/tests/Exit codes/11 on argument errors b/tests/Exit codes/11 on argument errors new file mode 100755 index 0000000..58bb1db --- /dev/null +++ b/tests/Exit codes/11 on argument errors @@ -0,0 +1,2 @@ +$TEST_SHELL ../../urchin --not-a-flag +test $? -eq 11 diff --git a/urchin b/urchin index 191e4b9..a5370e2 100755 --- a/urchin +++ b/urchin @@ -444,6 +444,10 @@ do } validate_strings "$shell_for_sh_tests" 'Shell paths' + if echo "$shell_for_sh_tests" | grep \ > /dev/null; then + echo "Warning: It is best if shell paths contain no spaces so that +you don't need to quote the TEST_SHELL variable." > /dev/stderr + fi echo "$shell_for_sh_tests" >> "$shell_list" ;;