summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/cperl-mode-tests.el
diff options
context:
space:
mode:
authorHarald Jörg <haj@posteo.de>2021-06-11 13:52:45 +0200
committerHarald Jörg <haj@posteo.de>2021-06-11 13:55:08 +0200
commit87bd14ca8bdecda6964aeb3c323faee846a8c1b8 (patch)
tree8f47365401b013d5b558cc57af40b206657ca481 /test/lisp/progmodes/cperl-mode-tests.el
parent56e21ab2e1bf4836573acfeb1e36716526a183b9 (diff)
downloademacs-87bd14ca8bdecda6964aeb3c323faee846a8c1b8.tar.gz
; perl-mode.el: Allow newline between quote-likes and delimiter
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Allow newline between a quote-like operator and its delimiter (Bug#22355). * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-22355): Test case for the fix. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl: Test resource for a quote-like with newline before the delimiter.
Diffstat (limited to 'test/lisp/progmodes/cperl-mode-tests.el')
-rw-r--r--test/lisp/progmodes/cperl-mode-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el
index dcf4f398c29..4d2bac6ee47 100644
--- a/test/lisp/progmodes/cperl-mode-tests.el
+++ b/test/lisp/progmodes/cperl-mode-tests.el
@@ -377,6 +377,17 @@ documentation it does the right thing anyway."
(cperl-indent-command)
(forward-line 1))))
+(ert-deftest cperl-test-bug-22355 ()
+ "Verify that substitutions are fontified directly after \"|&\".
+Regular expressions are strings in both perl-mode and cperl-mode."
+ (with-temp-buffer
+ (insert-file-contents (ert-resource-file "cperl-bug-22355.pl"))
+ (funcall cperl-test-mode)
+ (goto-char (point-min))
+ ;; Just check for the start of the string
+ (search-forward "{")
+ (should (nth 3 (syntax-ppss)))))
+
(ert-deftest cperl-test-bug-23992 ()
"Verify that substitutions are fontified directly after \"|&\".
Regular expressions are strings in both perl-mode and cperl-mode."