Many of our tests in `tests/lean/run/` produce output from `#eval` (or `#check`) statements, that is then ignored. This PR tries to capture all the useful output using `#guard_msgs`. I've only done a cursory check that the output is still sane --- there is a chance that some "unchecked" tests have already accumulated regressions and this just cements them! In the other direction, I did identify two rotten tests: * a minor one in `setStructInstNotation.lean`, where a comment says `Set Nat`, but `#check` actually prints `?_`. Weird? * `CompilerProbe.lean` is generating empty output, apparently indicating that something is broken, but I don't know the signficance of this file. In any case, I'll ask about these elsewhere. (This started by noticing that a recent `grind` test file had an untested `trace_state`, and then got carried away.)
12 lines
391 B
Text
12 lines
391 B
Text
-- set_option trace.Elab true
|
||
def f (xs : Array Nat) (ys : List (Nat × Nat)) (s : String) : IO Unit := do
|
||
for x in xs, (y₁, y₂) in ys, c in s do
|
||
IO.println s!"x: {x}, y₁: {y₁}, y₂: {y₂}, c: {c}"
|
||
|
||
/--
|
||
info: x: 1, y₁: 5, y₂: 15, c: h
|
||
x: 2, y₁: 6, y₂: 16, c: e
|
||
x: 3, y₁: 7, y₂: 17, c: l
|
||
-/
|
||
#guard_msgs in
|
||
#eval f #[1, 2, 3, 4] [(5, 15), (6, 16), (7, 17)] "hello"
|