blob 33d0d7942ef4f55a5ac5da6a0637eccb86353326 2068 bytes (raw)
name: test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl # note: path name is non-authoritative(*)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
| | #!/usr/bin/env perl
use strict;
use warnings;
use 5.020;
# This file contains test input and expected output for the tests in
# cperl-mode-tests.el, cperl-mode-test-indent-exp. The code is
# syntactically valid, but doesn't make much sense.
# -------- for loop: input --------
for my $foo (@ARGV)
{
...;
}
# -------- for loop: expected output --------
for my $foo (@ARGV) {
...;
}
# -------- for loop: end --------
# -------- while loop: input --------
{
while (1)
{
say "boring loop";
}
continue
{
last;
}
}
# -------- while loop: expected output --------
{
while (1) {
say "boring loop";
} continue {
last;
}
}
# -------- while loop: end --------
# -------- if-then-else: input --------
if (my $foo) { bar() } elsif (quux()) { baz() } else { quuux }
# -------- if-then-else: expected output --------
if (my $foo) {
bar();
} elsif (quux()) {
baz();
} else {
quuux;
}
# -------- if-then-else: end --------
# -------- labels: input --------
{
LABEL:
for (0..1) {
next LABEL if $_;
unless ($_) last LABEL;
}
LABEL_WITH_SPACE :
while (1) {
last LABEL_WITH_SPACE;
}
LABEL_WITH_COMMENT : # explain that label
say "This label has a comment."
}
# -------- labels: expected output --------
{
LABEL:
for (0..1) {
next LABEL if $_;
unless ($_) last LABEL;
}
LABEL_WITH_SPACE :
while (1) {
last LABEL_WITH_SPACE;
}
LABEL_WITH_COMMENT : # explain that label
say "This label has a comment."
}
# -------- labels: end --------
# -------- packages: input --------
package Foo {
package Foo::Inner::One {
...;
}
package Foo::Inner::Two {
...;
}
}
# -------- packages: expected output --------
package Foo {
package Foo::Inner::One {
...;
}
package Foo::Inner::Two {
...;
}
}
# -------- packages: end --------
# -------- braces after newline: input --------
package Outer {
package Inner
{
sub foo
{
}
sub bar
{
}
}
}
# -------- braces after newline: expected output --------
package Outer {
package Inner
{
sub foo
{
}
sub bar
{
}
}
}
# -------- braces after newline: end --------
|
debug log:
solving 33d0d7942e ...
found 33d0d7942e in https://yhetil.org/emacs/87im68uwld.fsf@hajtower/
found 8c1883a10f in https://git.savannah.gnu.org/cgit/emacs.git
preparing index
index prepared:
100644 8c1883a10f17d1b42926f80141cb16049f3e6814 test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl
applying [1/1] https://yhetil.org/emacs/87im68uwld.fsf@hajtower/
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl
index 8c1883a10f..33d0d7942e 100644
Checking patch test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl...
Applied patch test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl cleanly.
index at:
100644 33d0d7942ef4f55a5ac5da6a0637eccb86353326 test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.