doesn't quite work

This commit is contained in:
Thomas Levine 2016-02-28 18:54:18 +00:00
parent 32b32d0aa2
commit fa402bd42d
2 changed files with 12 additions and 1 deletions

View File

@ -1,12 +1,22 @@
n=0
tmp=$(mktemp -d)
testdir=$tmp/tests
while read line; do
n=$(($n + 1))
contents=$(echo "$line" | cut -d, -f1)
expectation=$(echo "$line" | cut -d, -f2)
# Set up the test suite.
mkdir -p "$testdir/$n"
touch "$testdir/$n/.urchin"
echo "$contents" > "$testdir/$n/testcase"
# Write the test that runs on the test suite
echo "#!/bin/sh
../../urchin -t '$testdir/$n' | grep '$expectation'" > $n
# Skip if invalid.
echo "$contents" > "$n"
if test "$expectation" = ok || test "$expectation" = not\ ok ||
test "$expectation" = skip; then
chmod +x $n

View File

@ -1,3 +1,4 @@
rm -R "$tmp"
if ls | grep '^[0-9]' > /dev/null; then
rm [0-9]*
fi