lean4-htt/tests/elab/versoDocModuleDeclOnly.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

45 lines
1.1 KiB
Text

/-
Tests that `doc.verso.module false` disables Verso for module docs
while `doc.verso true` keeps declaration docs as Verso.
-/
import Lean
-- Module docs use Markdown, declaration docs use Verso
set_option doc.verso true
set_option doc.verso.module false
/-!
This is a plain Markdown module doc with `code` and **bold**.
Verso syntax is {here}**visible**.
-/
open Lean Elab Term in
/--
info: Markdown:
This is a plain Markdown module doc with `code` and **bold**.
Verso syntax is {here}**visible**.
Verso:
-/
#guard_msgs in
#eval show TermElabM Unit from do
IO.println "Markdown:"
for modDoc in (Lean.getMainModuleDoc (← getEnv)).toArray do
IO.println modDoc.doc
IO.println "Verso:"
for modDoc in (Lean.getMainVersoModuleDocs (← getEnv)).snippets do
IO.println <| repr modDoc
/--
{name}`versoDecl`
-/
def versoDecl := "hello"
-- This would show the Verso syntax if it were interpreted as Markdown
open Lean Elab Term in
/-- info: `versoDecl` -/
#guard_msgs in
#eval show TermElabM Unit from do
(← findDocString? (← getEnv) ``versoDecl).forM (IO.println ·)