C compiler with embedded metalanguage.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
569 B

#!/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
for i in tests-c/*.c; do
echo $i
j="${i%.c}.out"
$run < $i > $j
cmp $i $j || die $i $j
done