test(tests/lean/extra): add extra tests for 'print' command
This commit is contained in:
parent
ed85ac254a
commit
9d1e312c12
3 changed files with 26 additions and 0 deletions
|
@ -37,6 +37,9 @@ add_test(lean_server_trace ${CMAKE_CURRENT_BINARY_DIR}/lean --server-trace "${LE
|
|||
add_test(NAME "lean_eqn_macro"
|
||||
WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lean/extra"
|
||||
COMMAND bash "./test_eqn_macro.sh" "${CMAKE_CURRENT_BINARY_DIR}/lean")
|
||||
add_test(NAME "lean_print_notation"
|
||||
WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lean/extra"
|
||||
COMMAND bash "./test_single.sh" "${CMAKE_CURRENT_BINARY_DIR}/lean" "print_tests.lean")
|
||||
|
||||
# LEAN TESTS
|
||||
file(GLOB LEANTESTS "${LEAN_SOURCE_DIR}/../tests/lean/*.lean")
|
||||
|
|
7
tests/lean/extra/print_tests.lean
Normal file
7
tests/lean/extra/print_tests.lean
Normal file
|
@ -0,0 +1,7 @@
|
|||
print notation
|
||||
|
||||
print notation ∧ ∨
|
||||
|
||||
print notation if
|
||||
|
||||
print notation mod
|
16
tests/lean/extra/test_single.sh
Executable file
16
tests/lean/extra/test_single.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: test_single.sh [lean-executable-path] [file]"
|
||||
exit 1
|
||||
fi
|
||||
ulimit -s 8192
|
||||
LEAN=$1
|
||||
export LEAN_PATH=../../../library:.
|
||||
f=$2
|
||||
echo "-- testing $f"
|
||||
if $LEAN $f; then
|
||||
echo "-- checked"
|
||||
else
|
||||
echo "failed $f"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue