lean4-htt/test/44/test.sh
2022-08-03 00:56:50 -04:00

20 lines
540 B
Bash
Executable file

#!/usr/bin/env bash
set -exo pipefail
LAKE=${LAKE:-../../build/bin/lake}
./clean.sh
$LAKE new hello
$LAKE -d hello build
sleep 0.1 # for some reason, delay needed for `--old` rebuild consistency
echo 'def hello := "old"' > hello/Hello.lean
$LAKE -d hello build --old | tee produced.out
echo 'def hello := "normal"' > hello/Hello.lean
$LAKE -d hello build | tee -a produced.out
if [ "$OS" = Windows_NT ]; then
sed -i 's/.exe//g' produced.out
diff --strip-trailing-cr expected.out produced.out
else
diff expected.out produced.out
fi