test(emacs/lean-info-test): add test cases for goal visualization
[skip ci]
This commit is contained in:
parent
6973d3e7aa
commit
5ad312f6ce
1 changed files with 155 additions and 42 deletions
|
@ -246,7 +246,120 @@
|
||||||
"⊢ and b c")))
|
"⊢ and b c")))
|
||||||
|
|
||||||
'(("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ a")
|
'(("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ a")
|
||||||
("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ and b c")))))
|
("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ and b c"))))
|
||||||
|
(should (equal (lean-info-proofstate-extract-conclusion
|
||||||
|
'("a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ b ∧ c"
|
||||||
|
"..."))
|
||||||
|
'("⊢ b ∧ c" "...")))
|
||||||
|
(should (equal (lean-info-proofstate-extract-premises
|
||||||
|
'("a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ b ∧ c"
|
||||||
|
"..."))
|
||||||
|
'("a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c")))
|
||||||
|
(should (equal (lean-info-proofstate-states-str
|
||||||
|
(lean-info-proofstate-parse
|
||||||
|
'("-- PROOF_STATE|6|17"
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ a"
|
||||||
|
"--"
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ and b c"))
|
||||||
|
'show-all)
|
||||||
|
(string-join '("a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ a"
|
||||||
|
""
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ and b c") "\n")))
|
||||||
|
(should (equal (lean-info-proofstate-states-str
|
||||||
|
(lean-info-proofstate-parse
|
||||||
|
'("-- PROOF_STATE|6|17"
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ a"
|
||||||
|
"--"
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ and b c"))
|
||||||
|
'show-first)
|
||||||
|
(string-join '("a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ a") "\n")))
|
||||||
|
(should (equal (lean-info-proofstate-states-str
|
||||||
|
(lean-info-proofstate-parse
|
||||||
|
'("-- PROOF_STATE|6|17"
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ a"
|
||||||
|
"--"
|
||||||
|
"a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ and b c"))
|
||||||
|
'show-first-and-other-conclusions)
|
||||||
|
(string-join '("a : Prop,"
|
||||||
|
"b : Prop,"
|
||||||
|
"c : Prop,"
|
||||||
|
"H_1 : a,"
|
||||||
|
"H_2 : b,"
|
||||||
|
"H_3 : c"
|
||||||
|
"⊢ a"
|
||||||
|
""
|
||||||
|
"⊢ and b c") "\n"))))
|
||||||
|
|
||||||
(ert-deftest lean-test-info-pos ()
|
(ert-deftest lean-test-info-pos ()
|
||||||
"Test lean-info-pos"
|
"Test lean-info-pos"
|
||||||
|
|
Loading…
Reference in a new issue