#!/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
|