chore: allow module in tests (#8881)

This PR adjusts the test scripts and adds a simple test-only lakefile so
that `experimental.module` is set both when editing and running tests.
This commit is contained in:
Sebastian Ullrich 2025-06-21 11:49:22 +09:00 committed by GitHub
parent 12a8f1b5f8
commit c38c0898a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View file

@ -6,7 +6,6 @@
lake-manifest.json
/build
/src/lakefile.toml
/tests/lakefile.toml
/lakefile.toml
GPATH
GRTAGS

5
tests/lakefile.toml Normal file
View file

@ -0,0 +1,5 @@
name = "tests"
# Allow `module` in tests when opened in the language server.
# Enabled during actual test runs in the respective test_single.sh.
moreGlobalServerArgs = ["-Dexperimental.module=true"]

View file

@ -1,3 +1,5 @@
module
inductive t | one | two
example (h : False) : t.one = t.two := by

View file

@ -2,5 +2,5 @@
source ../common.sh
# these tests don't have to succeed
exec_capture lean -DprintMessageEndPos=true -Dlinter.all=false -DElab.async=true "$f" || true
exec_capture lean -DprintMessageEndPos=true -Dlinter.all=false -Dexperimental.module=true "$f" || true
diff_produced