mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-13 15:39:02 +00:00

* lisp/progmodes/perl-mode.el (perl--format-regexp): New defconst. (perl--end-of-format-p): New function. (perl-continuation-line-p): Use it. (perl-calculate-indent): Use it. Make the lines of the formlist stay at column 0. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-35925.pl: New test file. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-35925): New test.
36 lines
614 B
Perl
36 lines
614 B
Perl
# This resource file can be run with cperl--run-testcases from
|
|
# cperl-tests.el and works with both perl-mode and cperl-mode.
|
|
|
|
# -------- Bug#35925: input -------
|
|
format FH =
|
|
@### @.### @###
|
|
42, 3.1415, 0
|
|
.
|
|
write FH;
|
|
|
|
# -------- Bug#35925: expected output -------
|
|
format FH =
|
|
@### @.### @###
|
|
42, 3.1415, 0
|
|
.
|
|
write FH;
|
|
|
|
# -------- Bug#35925: end -------
|
|
|
|
# -------- format not as top-level: input -------
|
|
foo: {
|
|
format STDOUT =
|
|
^<<<<
|
|
$foo
|
|
.
|
|
write;
|
|
}
|
|
# -------- format not as top-level: expected output -------
|
|
foo: {
|
|
format STDOUT =
|
|
^<<<<
|
|
$foo
|
|
.
|
|
write;
|
|
}
|
|
# -------- format not as top-level: end -------
|