2013-11-18 23:02:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
if [ $# -ne 2 ]; then
|
|
|
|
echo "Usage: test.sh [leanlua-executable-path] [file]"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ulimit -s unlimited
|
|
|
|
LEANLUA=$1
|
|
|
|
f=$2
|
|
|
|
echo "-- testing $f"
|
|
|
|
if $LEANLUA util.lua $f > $f.produced.out; then
|
|
|
|
echo "-- worked"
|
|
|
|
exit 0
|
|
|
|
else
|
2013-11-18 23:39:55 +00:00
|
|
|
echo "ERROR executing $f, produced output:"
|
|
|
|
cat $f.produced.out
|
2013-11-18 23:02:12 +00:00
|
|
|
exit 1
|
|
|
|
fi
|