test: add tests/lean/newfrontend
cc @Kha
This commit is contained in:
parent
9f2172e65e
commit
6c474a1eb6
3 changed files with 32 additions and 0 deletions
|
|
@ -175,6 +175,17 @@ FOREACH(T ${LEANRUNTESTS})
|
|||
endif()
|
||||
ENDFOREACH(T)
|
||||
|
||||
# LEAN new frontend TESTS
|
||||
file(GLOB LEANNEWFRONTENDTESTS "${LEAN_SOURCE_DIR}/../tests/lean/newfrontend/*.lean")
|
||||
FOREACH(T ${LEANNEWFRONTENDTESTS})
|
||||
if(NOT T MATCHES "\\.#")
|
||||
GET_FILENAME_COMPONENT(T_NAME ${T} NAME)
|
||||
add_test(NAME "leannewfrontendtest_${T_NAME}"
|
||||
WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lean/newfrontend"
|
||||
COMMAND bash "./test_single.sh" "${CMAKE_CURRENT_BINARY_DIR}/lean" ${T_NAME})
|
||||
endif()
|
||||
ENDFOREACH(T)
|
||||
|
||||
# LEAN FAIL TESTS
|
||||
file(GLOB LEANFAILTESTS "${LEAN_SOURCE_DIR}/../tests/lean/fail/*.lean")
|
||||
FOREACH(T ${LEANFAILTESTS})
|
||||
|
|
|
|||
3
tests/lean/newfrontend/t1.lean
Normal file
3
tests/lean/newfrontend/t1.lean
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
variable {α : Type}
|
||||
def f (a : α) : α := a
|
||||
#check f 1
|
||||
18
tests/lean/newfrontend/test_single.sh
Executable file
18
tests/lean/newfrontend/test_single.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/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=Init=../../../src/Init:Test=.
|
||||
f=$2
|
||||
echo "-- testing $f"
|
||||
"$LEAN" -j 0 --new-frontend "$f"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "-- checked"
|
||||
else
|
||||
echo "failed $f"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue