diff --git a/tests.old/A nonempty CDPATH should not break urchin. b/tests.old/A nonempty CDPATH should not break urchin. deleted file mode 100755 index cd585ec..0000000 --- a/tests.old/A nonempty CDPATH should not break urchin. +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -cd .. -export CDPATH=$PWD -./urchin -f 'tests/urchin exit code' >/dev/null - diff --git a/tests/Single-file test suites/.test_testsuite b/tests/Single-file test suites/.test_testsuite index b3647da..7e824fa 100755 --- a/tests/Single-file test suites/.test_testsuite +++ b/tests/Single-file test suites/.test_testsuite @@ -1,6 +1,8 @@ #!/bin/sh set -e +export tmp=$(mktemp -d) + contents="$1" expectation="$2" @@ -20,4 +22,8 @@ case "$expectation" in ok) regex='^ok 1 - testcase';; esac # Run the test suite +set +e ../../urchin -n -t $testdir | grep "$regex" +code=$? +rm -R $tmp +exit $? diff --git a/tests/Single-file test suites/CDPATH b/tests/Single-file test suites/CDPATH new file mode 100755 index 0000000..44136eb --- /dev/null +++ b/tests/Single-file test suites/CDPATH @@ -0,0 +1 @@ +CDPATH=/ .test_testsuite '' ok diff --git a/tests/Single-file test suites/setup b/tests/Single-file test suites/setup index dde93d2..7d1f9cb 100644 --- a/tests/Single-file test suites/setup +++ b/tests/Single-file test suites/setup @@ -1,2 +1 @@ -export tmp=$(mktemp -d) export PATH="$PWD:$PATH" diff --git a/tests/Single-file test suites/teardown b/tests/Single-file test suites/teardown deleted file mode 100644 index 87c57be..0000000 --- a/tests/Single-file test suites/teardown +++ /dev/null @@ -1 +0,0 @@ -rm -R "$tmp"