emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/tuareg 4c4fad3 5/5: Work around bug in Emacs 26 and older


From: ELPA Syncer
Subject: [nongnu] elpa/tuareg 4c4fad3 5/5: Work around bug in Emacs 26 and older
Date: Fri, 27 Aug 2021 10:57:58 -0400 (EDT)

branch: elpa/tuareg
commit 4c4fad3c096876939ea0a329638a1825786cfc26
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Christophe Troestler <christophe.Troestler@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]