emacs-diffs
[Top][All Lists]
Advanced

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

master a9a4af6: * test/lisp/progmodes/cperl-mode-tests.el: Silence warni


From: Stefan Monnier
Subject: master a9a4af6: * test/lisp/progmodes/cperl-mode-tests.el: Silence warnings
Date: Thu, 18 Mar 2021 14:32:42 -0400 (EDT)

branch: master
commit a9a4af6ff18487938f4859418e8e27ffb174af7c
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * test/lisp/progmodes/cperl-mode-tests.el: Silence warnings
    
    (cperl-test-bug-47112): Actually obey the major-mode for the test.
---
 test/lisp/progmodes/cperl-mode-tests.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/lisp/progmodes/cperl-mode-tests.el 
b/test/lisp/progmodes/cperl-mode-tests.el
index f0e1502..8078e9c 100644
--- a/test/lisp/progmodes/cperl-mode-tests.el
+++ b/test/lisp/progmodes/cperl-mode-tests.el
@@ -135,6 +135,9 @@ point in the distant past, and is still broken in 
perl-mode. "
         (should (equal (nth 3 (syntax-ppss)) nil))
         (should (equal (nth 4 (syntax-ppss)) t))))))
 
+(defvar perl-continued-statement-offset)
+(defvar perl-indent-level)
+
 (ert-deftest cperl-test-heredocs ()
   "Test that HERE-docs are fontified with the appropriate face."
   (require 'perl-mode)
@@ -242,7 +245,7 @@ This test relies on the specific layout of the index alist 
as
 created by CPerl mode, so skip it for Perl mode."
   (skip-unless (eq cperl-test-mode #'cperl-mode))
   (with-temp-buffer
-    (insert-file (ert-resource-file "grammar.pl"))
+    (insert-file-contents (ert-resource-file "grammar.pl"))
     (cperl-mode)
     (let ((index (cperl-imenu--create-perl-index))
           current-list)
@@ -457,8 +460,8 @@ as that quote like operator."
     (funcall cperl-test-mode)
     (insert "sub y_max { q:bar:; y _bar_foo_; }")
     (goto-char (point-min))
-    (cperl-update-syntaxification (point-max))
-    (font-lock-fontify-buffer)
+    (syntax-propertize (point-max))
+    (font-lock-ensure)
     (search-forward "max")
     (should (equal (get-text-property (match-beginning 0) 'face)
                    'font-lock-function-name-face))



reply via email to

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