Skip to content

Commit

Permalink
fix tests for preceding commit
Browse files Browse the repository at this point in the history
- update manuals
- fix test omit-proofs-omit-and-not-omit: do not use the *response*
  buffer any more
- expect errors in tests 020_coq-test-definition,
  090_coq-test-regression-Fail and 091_coq-test-regression-Fail
  • Loading branch information
hendriktews committed Mar 8, 2024
1 parent 4e42494 commit bf1b876
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
13 changes: 13 additions & 0 deletions ci/coq-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ For example, COMMENT could be (*test-definition*)"


(ert-deftest 020_coq-test-definition ()
;; There are no infomsgr when running silent.
:expected-result :failed
"Test *response* output after asserting a Definition."
(coq-fixture-on-file
(coq-test-full-path "test_stepwise.v")
Expand Down Expand Up @@ -317,6 +319,10 @@ For example, COMMENT could be (*test-definition*)"


(ert-deftest 090_coq-test-regression-Fail()
;; When running silent, the message about indeed failing is not
;; shown. One might fix this test by checking that there is no
;; error, which would be shown without Fail.
:expected-result :failed
"Test for Fail"
(coq-fixture-on-file
(coq-test-full-path "test_stepwise.v")
Expand All @@ -338,6 +344,13 @@ Tactic failure: Cannot solve this goal." "*coq*")))))
;; (coq-should-buffer-regexp (regexp-quote "The command has indeed failed with message: Tactic failure: Cannot solve this goal.") "*response*")

(ert-deftest 091_coq-test-regression-Fail()
;; XXX What is the difference between this test and
;; 090_coq-test-regression-Fail?

;; When running silent, the message about indeed failing is not
;; shown. One might fix this test by checking that there is no
;; error, which would be shown without Fail.
:expected-result :failed
"Test for Fail"
(coq-fixture-on-file
(coq-test-full-path "test_stepwise.v")
Expand Down
15 changes: 10 additions & 5 deletions ci/simple-tests/coq-test-omit-proofs.el
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ configured there may be taken from faces with less priority."
"Test the omit proofs feature.
In particular, test that with proof-omit-proofs-option configured:
- the proof _is_ processed when using a prefix argument
- in this case the proof as normal locked color
- in this case the proof has normal locked color
- without prefix arg, the proof is omitted
- the proof has omitted color then
- stuff before the proof still has normal color "
Expand Down Expand Up @@ -154,10 +154,15 @@ In particular, test that with proof-omit-proofs-option configured:
(forward-line -1)
(proof-goto-point)
(wait-for-coq)
(with-current-buffer "*response*"
(goto-char (point-min))
;; There should be a declared message.
(should (looking-at "classic_excluded_middle is declared")))
(with-current-buffer "*coq*"
;; There should be an Admit at the second last prompt.
(goto-char (point-max))
(should (search-backward "</prompt>" nil t 2))
;; move behind prompt
(forward-char 9)
;; There should be a Qed with no error or message after it
(should
(looking-at "Admitted\\.\n\n<prompt>Coq <")))

;; Check 4: check proof-omitted-proof-face is active at marker 3
(message "4: check proof-omitted-proof-face is active at marker 3")
Expand Down
2 changes: 2 additions & 0 deletions doc/PG-adapting.texi
Original file line number Diff line number Diff line change
Expand Up @@ -3890,6 +3890,8 @@ bother the user. They may include
@code{'no-goals-display} do not goals in @strong{goals} buffer
@code{'proof-tree-show-subgoal} item inserted by the proof-tree package
@code{'priority-action} item added via @code{proof-add-to-priority-queue}
@code{'empty-action-list} @code{proof-shell-empty-action-list-command} should not be
called if this is the last item in the action list
@end lisp
Note that @code{'invisible} does not imply any of the others. If flags
are non-empty, interactive cues will be surpressed. (E.g.,
Expand Down

0 comments on commit bf1b876

Please sign in to comment.