test: add test for getModuleDoc?
This commit is contained in:
parent
f2bbe222d7
commit
9dc2a4240d
2 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,14 @@ def tst : MetaM Unit := do
|
|||
let docs := getMainModuleDoc (← getEnv)
|
||||
IO.println <| docs.toList.map repr
|
||||
|
||||
def printDoc (moduleName : Name) : MetaM Unit := do
|
||||
match getModuleDoc? (← getEnv) moduleName with
|
||||
| some docs => IO.println <| docs.toList.map repr
|
||||
| _ => throwError "module not found"
|
||||
|
||||
/-! Another module doc. -/
|
||||
|
||||
#eval tst
|
||||
|
||||
#eval printDoc `Lean.Meta.ReduceEval
|
||||
#eval printDoc `Lean.Data.Lsp.Communication
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
["Testing module documentation. ", "Another module doc. "]
|
||||
["Evaluation by reduction "]
|
||||
["Reading/writing LSP messages from/to IO handles. "]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue