allow skipping

This commit is contained in:
Thomas Levine 2016-02-28 19:26:18 +00:00
parent 77da4ce194
commit fe9daae67b

View File

@ -1,22 +1,22 @@
#!/bin/sh #!/bin/sh
set -e set -e
contents="$1"
expectation="$2"
testdir=$tmp/tests testdir=$tmp/tests
mkdir -p $testdir mkdir -p $testdir
touch $testdir/.urchin touch $testdir/.urchin
testcase=$testdir/testcase testcase=$testdir/testcase
contents="$1"
expectation="$2"
# Set up the test suite. # Set up the test suite.
echo "$contents" > $testcase echo "$contents" > $testcase
chmod +x $testcase chmod +x $testcase
case "$expectation" in ok) regex='^ok 1 - testcase';; case "$expectation" in ok) regex='^ok 1 - testcase';;
not\ ok) regex='^not ok 1 - testcase';; not\ ok) regex='^not ok 1 - testcase';;
skip) regex='^ok 1 - testcase # SKIP';; skip) regex='^ok 1 - testcase ([)]*) # SKIP';;
*) chmod -x $testcase;; *) exit 3;; # skip malformed test
esac esac
# Run the test suite # Run the test suite