]> code.delx.au - gnu-emacs/blobdiff - test/automated/bytecomp-tests.el
* test/automated/package-test.el (package-test-signed): Tweak skip
[gnu-emacs] / test / automated / bytecomp-tests.el
index f51710aa8c590903844ea9d9228ed60edc1706d2..48211f03ba491d4ded28ca838b1abde8733110e3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; bytecomp-testsuite.el
 
-;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2016 Free Software Foundation, Inc.
 
 ;; Author:         Shigeru Fukaya <shigeru.fukaya@gmail.com>
 ;; Created:        November 2008
@@ -376,8 +376,12 @@ Subtests signal errors if something goes wrong."
   (with-current-buffer (get-buffer-create "*Compile-Log*")
     (goto-char (point-min))
     ;; Should warn that mt--test1[12] are first used as functions.
-    (should (re-search-forward "my--test11:\n.*macro" nil t))
-    (should (re-search-forward "my--test12:\n.*macro" nil t))
+    ;; The second alternative is for when the file name is so long
+    ;; that pretty-printing starts the message on the next line.
+    (should (or (re-search-forward "my--test11:\n.*macro" nil t)
+                (re-search-forward "my--test11:\n.*:\n.*macro" nil t)))
+    (should (or (re-search-forward "my--test12:\n.*macro" nil t)
+                (re-search-forward "my--test12:\n.*:\n.*macro" nil t)))
     (goto-char (point-min))
     ;; Should not warn that mt--test2 is not known to be defined.
     (should-not (re-search-forward "my--test2" nil t))))