]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix failing test
authorTino Calancha <tino.calancha@gmail.com>
Thu, 21 Jul 2016 12:51:24 +0000 (21:51 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Thu, 21 Jul 2016 12:51:24 +0000 (21:51 +0900)
* test/lisp/erc/erc-track-tests.el (erc-track--erc-faces-in):
Enable Font Lock mode in order to initialize
'char-property-alias-alist' (Bug#23954).

test/lisp/erc/erc-track-tests.el

index 24dfcfbe6e0a07bdc97f83b92b27b96506426118..7cf3ef7bb2fd3d06a902ba672223dd97dda4ee0e 100644 (file)
@@ -24,6 +24,7 @@
 
 (require 'ert)
 (require 'erc-track)
+(require 'font-core)
 
 (ert-deftest erc-track--shorten-aggressive-nil ()
   "Test non-aggressive erc track buffer name shortening."
 (ert-deftest erc-track--erc-faces-in ()
   "`erc-faces-in' should pick up both 'face and 'font-lock-face properties."
   (let ((str0 "is bold")
-        (str1 "is bold")
-        ;;(char-property-alias-alist '((face font-lock-face)))
-        )
+        (str1 "is bold"))
+    ;; Turn on Font Lock mode: this initialize `char-property-alias-alist'
+    ;; to '((face font-lock-face)).  Note that `font-lock-mode' don't
+    ;; turn on the mode if the test is run on batch mode or if the
+    ;; buffer name starts with ?\s (Bug#23954).
+    (unless font-lock-mode (font-lock-default-function 1))
     (put-text-property 3 (length str0) 'font-lock-face
                        '(bold erc-current-nick-face) str0)
     (put-text-property 3 (length str1) 'face