Browse Source

added test script

master
Nathan R 3 years ago
parent
commit
9f2caa77fd
1 changed files with 34 additions and 0 deletions
  1. +34
    -0
      dotest

+ 34
- 0
dotest View File

@ -0,0 +1,34 @@
#!/bin/sh
if test $# -gt 0; then
run="$@"
else
run="./ccmeta"
fi
die()
{
diff $1 $2 | head -20
exit 1
}
for i in tests-std/*.c; do
echo $i
j="${i%.c}.out"
$run < $i > $j
cmp $i $j || die $i $j
done
for i in tests-gnu/*.c; do
echo $i
j="${i%.c}.out"
$run < $i > $j
cmp $i $j || die $i $j
done
for i in tests-err/*.c; do
echo $i
j="${i%.c}.out"
$run < $i > $j
cmp -s $i $j || echo failed
done

Loading…
Cancel
Save