test(tests/lean/extra): add test for issue #597
This commit is contained in:
parent
ed388b00f1
commit
e0b39079eb
4 changed files with 24 additions and 0 deletions
|
@ -43,6 +43,9 @@ add_test(NAME "lean_print_notation"
|
||||||
add_test(NAME "auto_completion_issue_422"
|
add_test(NAME "auto_completion_issue_422"
|
||||||
WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lean/extra"
|
WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lean/extra"
|
||||||
COMMAND bash "./ac_bug.sh" "${CMAKE_CURRENT_BINARY_DIR}/lean")
|
COMMAND bash "./ac_bug.sh" "${CMAKE_CURRENT_BINARY_DIR}/lean")
|
||||||
|
add_test(NAME "issue_597"
|
||||||
|
WORKING_DIRECTORY "${LEAN_SOURCE_DIR}/../tests/lean/extra"
|
||||||
|
COMMAND bash "./issue_597.sh" "${CMAKE_CURRENT_BINARY_DIR}/lean")
|
||||||
|
|
||||||
# LEAN TESTS
|
# LEAN TESTS
|
||||||
file(GLOB LEANTESTS "${LEAN_SOURCE_DIR}/../tests/lean/*.lean")
|
file(GLOB LEANTESTS "${LEAN_SOURCE_DIR}/../tests/lean/*.lean")
|
||||||
|
|
4
tests/lean/extra/597a.hlean
Normal file
4
tests/lean/extra/597a.hlean
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
open equiv
|
||||||
|
open equiv.ops
|
||||||
|
constants (A B : Type₀) (f : A ≃ B)
|
||||||
|
definition foo : A → B := f
|
4
tests/lean/extra/597b.hlean
Normal file
4
tests/lean/extra/597b.hlean
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
open equiv
|
||||||
|
-- open equiv.ops
|
||||||
|
constants (A B : Type₀) (f : A ≃ B)
|
||||||
|
definition foo : A → B := f -- should fail
|
13
tests/lean/extra/issue_597.sh
Executable file
13
tests/lean/extra/issue_597.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "Usage: bug_597.sh [lean-executable-path]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
LEAN=$1
|
||||||
|
export HLEAN_PATH=../../../hott
|
||||||
|
"$LEAN" -c 597.clean 597a.hlean
|
||||||
|
if "$LEAN" -c 597.clean 597b.hlean; then
|
||||||
|
echo "ERROR: using incorrect cached value..."
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in a new issue