Carp/run_carp_tests.sh

36 lines
849 B
Bash
Raw Normal View History

2017-09-08 13:24:57 +03:00
#!/bin/bash
2017-11-22 14:42:32 +03:00
set -e; # will make the script stop if there are any errors
2017-09-08 13:24:57 +03:00
stack build;
stack install;
2017-09-08 13:24:57 +03:00
# Build and run some examples
carp ./examples/basics.carp -x;
carp ./examples/functor.carp -x;
carp ./examples/external_struct.carp -x;
carp ./examples/updating.carp -x;
carp ./examples/sorting.carp -x;
2018-01-02 10:56:23 +03:00
carp ./examples/globals.carp -x --log-memory;
carp ./examples/generic_structs.carp -x;
carp ./examples/setting_variables.carp -x;
# Actual tests (using the test suite)
2017-12-23 11:24:16 +03:00
carp ./test/memory.carp -x --log-memory;
for f in ./test/*.carp; do
echo $f
if [ $f != "./test/memory.carp" ]; then
carp -x $f
fi
echo
done
# Just make sure these compile
carp ./examples/mutual_recursion.carp -b;
carp ./examples/guessing.carp -b;
carp ./examples/ant.carp -b
carp ./examples/reptile.carp -b
carp ./examples/game.carp -b;
2017-12-14 00:09:12 +03:00
echo "ALL TESTS DONE."