Skip to content

Commit

Permalink
ci/coq-tests: expect 060_coq-test-wholefile to fail for 8.17
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriktews committed Apr 8, 2023
1 parent 911cf01 commit 1891f09
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ci/coq-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ For example, COMMENT could be (*test-definition*)"


(ert-deftest 060_coq-test-wholefile ()
;; test_wholefile.v triggers a fatal warning in 8.17, see also #698
:expected-result (if (coq--post-v817) :failed :passed)
"Test `proof-process-buffer'."
(coq-fixture-on-file
(coq-test-full-path "test_wholefile.v")
Expand Down
12 changes: 12 additions & 0 deletions coq/coq-system.el
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ Return nil if the version cannot be detected."
(signal 'coq-unclassifiable-version coq-version-to-use))
(t (signal (car err) (cdr err))))))))

(defun coq--post-v817 ()
"Return t if the auto-detected version of Coq is >= 8.17.
Return nil if the version cannot be detected."
(let ((coq-version-to-use (or (coq-version t) "8.16")))
(condition-case err
(not (coq--version< coq-version-to-use "8.17"))
(error
(cond
((equal (substring (cadr err) 0 15) "Invalid version")
(signal 'coq-unclassifiable-version coq-version-to-use))
(t (signal (car err) (cdr err))))))))

(defun coq--supports-topfile ()
"Return t if \"-topfile\" appears in coqtop options"
(string-match "-topfile" coq-autodetected-help)
Expand Down

0 comments on commit 1891f09

Please sign in to comment.