lean2/tests/lua/test_single.sh
Leonardo de Moura a98fdd9be6 refactor(shell): combine lean and leanlua executables in a single executable
The main motivation is to allow users to configure/extend Lean using .lua files before loading the actual .lean files.
Example:
        ./lean extension1.lua extension2.lua file.lean

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-19 16:48:21 -08:00

17 lines
326 B
Bash
Executable file

#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: test.sh [lean-executable-path] [file]"
exit 1
fi
ulimit -s unlimited
LEAN=$1
f=$2
echo "-- testing $f"
if $LEAN util.lua $f > $f.produced.out; then
echo "-- worked"
exit 0
else
echo "ERROR executing $f, produced output:"
cat $f.produced.out
exit 1
fi