Skip to content

Commit 5a425b6

Browse files
committed
Ignore 'compilation failed' line when running t/croak tests
This final line of output is often repeated across many tests, but its exact details aren't overly interesting from a testing perspective. It's easier just to ignore it in the output and then not have to rely on testing it all the time.
1 parent a17dbf9 commit 5a425b6

File tree

18 files changed

+7
-185
lines changed

18 files changed

+7
-185
lines changed

t/lib/croak/class

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ class XXX {
9696
}
9797
EXPECT
9898
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at - line 5.
99-
Execution of - aborted due to compilation errors.
10099
########
101100
# This test is known to leak: see GH #20812.
102101
no warnings 'experimental::class';

t/lib/croak/op

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ __END__
33
join,
44
EXPECT
55
Not enough arguments for join or string at - line 1, near "join,"
6-
Execution of - aborted due to compilation errors.
76
########
87
# NAME my $<special>
98
my $!;
109
EXPECT
1110
Can't use global $! in "my" at - line 1, near "my $!"
12-
Execution of - aborted due to compilation errors.
1311
########
1412
# NAME my $<non-ASCII> doesn't output garbage
1513
# \xB6 is same character in all three EBCDIC pages and Latin1
@@ -70,90 +68,76 @@ use feature 'bitwise';
7068
@a &= 1;
7169
EXPECT
7270
Can't modify array dereference in numeric bitwise and (&) at - line 2, near "1;"
73-
Execution of - aborted due to compilation errors.
7471
########
7572
# NAME Num-specific |= on @array
7673
use feature 'bitwise';
7774
@a |= 1;
7875
EXPECT
7976
Can't modify array dereference in numeric bitwise or (|) at - line 2, near "1;"
80-
Execution of - aborted due to compilation errors.
8177
########
8278
# NAME Num-specific ^= on @array
8379
use feature 'bitwise';
8480
@a ^= 1;
8581
EXPECT
8682
Can't modify array dereference in numeric bitwise xor (^) at - line 2, near "1;"
87-
Execution of - aborted due to compilation errors.
8883
########
8984
# NAME &.= on @array
9085
use feature 'bitwise';
9186
@a &.= 1;
9287
EXPECT
9388
Can't modify array dereference in string bitwise and (&.) at - line 2, near "1;"
94-
Execution of - aborted due to compilation errors.
9589
########
9690
# NAME |.= on @array
9791
use feature 'bitwise';
9892
@a |.= 1;
9993
EXPECT
10094
Can't modify array dereference in string bitwise or (|.) at - line 2, near "1;"
101-
Execution of - aborted due to compilation errors.
10295
########
10396
# NAME ^.= on @array
10497
use feature 'bitwise';
10598
@a ^.= 1;
10699
EXPECT
107100
Can't modify array dereference in string bitwise xor (^.) at - line 2, near "1;"
108-
Execution of - aborted due to compilation errors.
109101
########
110102
# NAME substr %h in scalar assignment
111103
substr(%h,0) = 3;
112104
EXPECT
113105
Can't modify hash dereference in substr at - line 1, near "3;"
114-
Execution of - aborted due to compilation errors.
115106
########
116107
# NAME substr %h in list assignment
117108
(substr %h,0) = 3;
118109
EXPECT
119110
Can't modify hash dereference in substr at - line 1, near "3;"
120-
Execution of - aborted due to compilation errors.
121111
########
122112
# NAME vec %h in scalar assignment
123113
vec(%h,1,1) = 3;
124114
EXPECT
125115
Can't modify hash dereference in vec at - line 1, near "3;"
126-
Execution of - aborted due to compilation errors.
127116
########
128117
# NAME vec %h in list assignment
129118
(vec %h,1,1) = 3;
130119
EXPECT
131120
Can't modify hash dereference in vec at - line 1, near "3;"
132-
Execution of - aborted due to compilation errors.
133121
########
134122
# NAME Can't declare conditional
135123
my($a?$b:$c)
136124
EXPECT
137125
Can't declare conditional expression in "my" at - line 1, at EOF
138-
Execution of - aborted due to compilation errors.
139126
########
140127
# NAME Can't declare do block
141128
my(do{})
142129
EXPECT
143130
Can't declare do block in "my" at - line 1, at EOF
144-
Execution of - aborted due to compilation errors.
145131
########
146132
# NAME ($_, state $x) = ...
147133
($_, CORE::state $x) = ();
148134
EXPECT
149135
Initialization of state variables in list currently forbidden at - line 1, near ");"
150-
Execution of - aborted due to compilation errors.
151136
########
152137
# NAME my $y; ($y, state $x) = ...
153138
my $y; ($y, CORE::state $x) = ();
154139
EXPECT
155140
Initialization of state variables in list currently forbidden at - line 1, near ");"
156-
Execution of - aborted due to compilation errors.
157141
########
158142
# NAME delete BAD
159143
delete $x;
@@ -180,43 +164,36 @@ exists argument is not a subroutine name at - line 1.
180164
push FRED;
181165
EXPECT
182166
Type of arg 1 to push must be array (not constant item) at - line 1, near "FRED;"
183-
Execution of - aborted due to compilation errors.
184167
########
185168
# NAME pop BAREWORD
186169
pop FRED;
187170
EXPECT
188171
Type of arg 1 to pop must be array (not constant item) at - line 1, near "FRED;"
189-
Execution of - aborted due to compilation errors.
190172
########
191173
# NAME shift BAREWORD
192174
shift FRED;
193175
EXPECT
194176
Type of arg 1 to shift must be array (not constant item) at - line 1, near "FRED;"
195-
Execution of - aborted due to compilation errors.
196177
########
197178
# NAME unshift BAREWORD
198179
unshift FRED;
199180
EXPECT
200181
Type of arg 1 to unshift must be array (not constant item) at - line 1, near "FRED;"
201-
Execution of - aborted due to compilation errors.
202182
########
203183
# NAME keys BAREWORD
204184
@a = keys FRED ;
205185
EXPECT
206186
Type of arg 1 to keys must be hash or array (not constant item) at - line 1, near "FRED ;"
207-
Execution of - aborted due to compilation errors.
208187
########
209188
# NAME values BAREWORD
210189
@a = values FRED ;
211190
EXPECT
212191
Type of arg 1 to values must be hash or array (not constant item) at - line 1, near "FRED ;"
213-
Execution of - aborted due to compilation errors.
214192
########
215193
# NAME each BAREWORD
216194
@a = each FRED ;
217195
EXPECT
218196
Type of arg 1 to each must be hash or array (not constant item) at - line 1, near "FRED ;"
219-
Execution of - aborted due to compilation errors.
220197
########
221198
# NAME better messages for array-ops on non-arrays
222199
push %a, 1;
@@ -236,7 +213,6 @@ Type of arg 1 to push must be array (not ref-to-glob cast) at - line 5, near "1;
236213
Type of arg 1 to pop must be array (not ref-to-glob cast) at - line 6, near "*a;"
237214
Type of arg 1 to shift must be array (not ref-to-glob cast) at - line 7, near "*a;"
238215
Type of arg 1 to unshift must be array (not ref-to-glob cast) at - line 8, near "1;"
239-
Execution of - aborted due to compilation errors.
240216
########
241217
# NAME better messages for array-ops on non-arrays (part 2)
242218
# to check PADHV without hitting the reported error limit
@@ -250,7 +226,6 @@ Type of arg 1 to push must be array (not private hash) at - line 3, near "1;"
250226
Type of arg 1 to pop must be array (not private hash) at - line 4, near "%a;"
251227
Type of arg 1 to shift must be array (not private hash) at - line 5, near "%a;"
252228
Type of arg 1 to unshift must be array (not private hash) at - line 6, near "1;"
253-
Execution of - aborted due to compilation errors.
254229
########
255230
use feature 'defer';
256231
no warnings 'experimental::defer';
@@ -307,7 +282,6 @@ sub xx {
307282
}
308283
EXPECT
309284
Missing comma after first argument to return at - line 2, near "5;"
310-
Execution of - aborted due to compilation errors.
311285
########
312286
# subsequent use VERSION to 5.39
313287
use v5.20;
@@ -333,12 +307,10 @@ no warnings 'experimental::keyword_any';
333307
any length, qw( a b c )
334308
EXPECT
335309
syntax error at - line 4, near "any length"
336-
Execution of - aborted due to compilation errors.
337310
########
338311
# all with deferred LIST expression
339312
use feature 'keyword_all';
340313
no warnings 'experimental::keyword_all';
341314
all length, qw( a b c )
342315
EXPECT
343316
syntax error at - line 4, near "all length"
344-
Execution of - aborted due to compilation errors.

t/lib/croak/parser

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ sub all (&@);
44
all { $_->[0] } map { [ }
55
EXPECT
66
syntax error at - line 2, near "[ }"
7-
Execution of - aborted due to compilation errors.

0 commit comments

Comments
 (0)