diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-18 14:32:36 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-18 14:32:36 -0400 |
commit | a9a4af6ff18487938f4859418e8e27ffb174af7c (patch) | |
tree | 2c7643d54adc65be1bd2d624946a20f28ca9dfc0 /test/lisp/progmodes/cperl-mode-tests.el | |
parent | 5c93063129de0a2005aac1ffe1c48c372b918634 (diff) | |
download | emacs-a9a4af6ff18487938f4859418e8e27ffb174af7c.tar.gz emacs-a9a4af6ff18487938f4859418e8e27ffb174af7c.tar.bz2 emacs-a9a4af6ff18487938f4859418e8e27ffb174af7c.zip |
* test/lisp/progmodes/cperl-mode-tests.el: Silence warnings
(cperl-test-bug-47112): Actually obey the major-mode for the test.
Diffstat (limited to 'test/lisp/progmodes/cperl-mode-tests.el')
-rw-r--r-- | test/lisp/progmodes/cperl-mode-tests.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index f0e15022d03..8078e9c9fa9 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)) |