diff options
Diffstat (limited to 'test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl')
-rw-r--r-- | test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl new file mode 100644 index 00000000000..62ef6982f38 --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl @@ -0,0 +1,55 @@ +# This resource file can be run with cperl--run-testcases from +# cperl-tests.el and works with both perl-mode and cperl-mode. + +# -------- Bug#64364: input ------- +package P { +sub way { ...; } +# +sub bus +:lvalue +($sig,$na,@ture) +{ +...; +} +} +# -------- Bug#64364: expected output ------- +package P { + sub way { ...; } + # + sub bus + :lvalue + ($sig,$na,@ture) + { + ...; + } +} +# -------- Bug#64364: end ------- + +# Now do this with multiline initializers +# -------- signature with init: input ------- +package P { +sub way { ...; } +# perl 5.38 or newer +sub bus +:lvalue +($sig, +$na //= 42, +@ture) +{ +...; +} +} +# -------- signature with init: expected output ------- +package P { + sub way { ...; } + # perl 5.38 or newer + sub bus + :lvalue + ($sig, + $na //= 42, + @ture) + { + ...; + } +} +# -------- signature with init: end ------- |