doesn't quite work
This commit is contained in:
parent
32b32d0aa2
commit
fa402bd42d
@ -1,12 +1,22 @@
|
|||||||
n=0
|
n=0
|
||||||
|
tmp=$(mktemp -d)
|
||||||
|
testdir=$tmp/tests
|
||||||
while read line; do
|
while read line; do
|
||||||
n=$(($n + 1))
|
n=$(($n + 1))
|
||||||
|
|
||||||
contents=$(echo "$line" | cut -d, -f1)
|
contents=$(echo "$line" | cut -d, -f1)
|
||||||
expectation=$(echo "$line" | cut -d, -f2)
|
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.
|
# Skip if invalid.
|
||||||
echo "$contents" > "$n"
|
|
||||||
if test "$expectation" = ok || test "$expectation" = not\ ok ||
|
if test "$expectation" = ok || test "$expectation" = not\ ok ||
|
||||||
test "$expectation" = skip; then
|
test "$expectation" = skip; then
|
||||||
chmod +x $n
|
chmod +x $n
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
rm -R "$tmp"
|
||||||
if ls | grep '^[0-9]' > /dev/null; then
|
if ls | grep '^[0-9]' > /dev/null; then
|
||||||
rm [0-9]*
|
rm [0-9]*
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user