aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-06-21 20:27:48 +0300
committerEli Zaretskii2015-06-21 20:27:48 +0300
commit3be98ca53b5de3d6442c9318663a8f3cb4dbfed0 (patch)
tree3a660e10e54ec43cbd06c5a5ff8d0334e3284d47
parent8bc4185d647df4313eada79311c07313139d9b4f (diff)
downloademacs-3be98ca53b5de3d6442c9318663a8f3cb4dbfed0.tar.gz
emacs-3be98ca53b5de3d6442c9318663a8f3cb4dbfed0.zip
Fix bytecomp-tests--warnings when $TMPDIR has a long name
* test/automated/bytecomp-tests.el (bytecomp-tests--warnings): Allow the warning to begin on the 3rd, not only 2nd line, which happens if temporary-file-directory has a very long name.
-rw-r--r--test/automated/bytecomp-tests.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/automated/bytecomp-tests.el b/test/automated/bytecomp-tests.el
index f51710aa8c5..c65009cb1b0 100644
--- a/test/automated/bytecomp-tests.el
+++ b/test/automated/bytecomp-tests.el
@@ -376,8 +376,12 @@ Subtests signal errors if something goes wrong."
376 (with-current-buffer (get-buffer-create "*Compile-Log*") 376 (with-current-buffer (get-buffer-create "*Compile-Log*")
377 (goto-char (point-min)) 377 (goto-char (point-min))
378 ;; Should warn that mt--test1[12] are first used as functions. 378 ;; Should warn that mt--test1[12] are first used as functions.
379 (should (re-search-forward "my--test11:\n.*macro" nil t)) 379 ;; The second alternative is for when the file name is so long
380 (should (re-search-forward "my--test12:\n.*macro" nil t)) 380 ;; that pretty-printing starts the message on the next line.
381 (should (or (re-search-forward "my--test11:\n.*macro" nil t)
382 (re-search-forward "my--test11:\n.*:\n.*macro" nil t)))
383 (should (or (re-search-forward "my--test12:\n.*macro" nil t)
384 (re-search-forward "my--test12:\n.*:\n.*macro" nil t)))
381 (goto-char (point-min)) 385 (goto-char (point-min))
382 ;; Should not warn that mt--test2 is not known to be defined. 386 ;; Should not warn that mt--test2 is not known to be defined.
383 (should-not (re-search-forward "my--test2" nil t)))) 387 (should-not (re-search-forward "my--test2" nil t))))