branch: elpa/tuareg commit 4c4fad3c096876939ea0a329638a1825786cfc26 Author: Mattias EngdegÄrd <matti...@acm.org> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
Work around bug in Emacs 26 and older Block test failures caused by a compilation-mode bug in old Emacs versions; see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34479 --- tuareg-tests.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tuareg-tests.el b/tuareg-tests.el index da1ca32..b24f495 100644 --- a/tuareg-tests.el +++ b/tuareg-tests.el @@ -569,9 +569,16 @@ Return (FILE TYPE START-LINE END-LINE START-COL END-COL)." ;; aa5437493b1ca539409495ecdc54cf420ea110b9. (when buggy-emacs-28 (setq end-col (1- end-col))) - (should (equal (tuareg-test--extract-message-info str pos) - (list file type - start-line end-line start-col end-col))))))))) + (let ((message-info (tuareg-test--extract-message-info str pos))) + (when (< emacs-major-version 27) + ;; Prior to Emacs 27, a bug in compilation-mode caused the + ;; message type to be wrong in some cases (Emacs bug#34479). + ;; Pretend that the test passed anyway. + (setq type (nth 1 message-info))) + (should (equal message-info + (list file type + start-line end-line + start-col end-col)))))))))) (defun tuareg-test--comment-region (text) (with-temp-buffer