summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl
blob: 62ef6982f388e5824ed71d4f1757c2c2166fe175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 -------