@@ -100,36 +100,28 @@ OPERATOR_CAST: {
100
100
test_varying_whitespace( @nothing , @asterisk_cast , @scalar );
101
101
}
102
102
103
- {
104
- local %known_bad_seps = map { $_ => 1 } qw( null ) ;
105
103
test_varying_whitespace( @number , @percent_op , @scalar );
106
104
test_varying_whitespace( @number , @percent_op , @list );
107
105
test_varying_whitespace( @number , @percent_op , @hash );
108
106
test_varying_whitespace( @number , @percent_op , @glob );
109
107
test_varying_whitespace( @number , @percent_op , @hashctor1 );
110
108
test_varying_whitespace( @number , @percent_op , @hashctor2 );
111
109
test_varying_whitespace( @number , @percent_op , @hashctor3 );
112
- }
113
110
test_varying_whitespace( @number , @percenteq_op , @bareword );
114
111
test_varying_whitespace( @number , @percenteq_op , @hashctor3 ); # doesn't compile, but make sure it's an operator
115
112
{
116
113
local %known_bad_seps = map { $_ => 1 } qw( space ) ;
117
114
test_varying_whitespace( @nothing , @percent_cast , @scalar );
118
115
}
119
116
120
- {
121
- local %known_bad_seps = map { $_ => 1 } qw( null ) ;
122
117
test_varying_whitespace( @number , @ampersand_op , @scalar );
123
118
test_varying_whitespace( @number , @ampersand_op , @list );
124
119
test_varying_whitespace( @number , @ampersand_op , @hash );
125
- }
120
+
126
121
test_varying_whitespace( @number , @ampersand_op , @glob );
127
- {
128
- local %known_bad_seps = map { $_ => 1 } qw( null ) ;
129
122
test_varying_whitespace( @number , @ampersand_op , @hashctor1 );
130
123
test_varying_whitespace( @number , @ampersand_op , @hashctor2 );
131
124
test_varying_whitespace( @number , @ampersand_op , @hashctor3 );
132
- }
133
125
test_varying_whitespace( @number , @ampersandeq_op , @bareword );
134
126
test_varying_whitespace( @number , @ampersandeq_op , @hashctor3 ); # doesn't compile, but make sure it's an operator
135
127
{
@@ -156,27 +148,28 @@ OPERATOR_CAST: {
156
148
}
157
149
158
150
my @single = ( " '3'" , [ ' PPI::Token::Quote::Single' => " '3'" , ] );
151
+ test_varying_whitespace( @single , @asterisk_op , @scalar );
159
152
{
160
153
local %known_bad_seps = map { $_ => 1 } qw( null ) ;
161
- test_varying_whitespace( @single , @asterisk_op , @scalar );
162
154
test_varying_whitespace( @single , @asterisk_op , @hashctor3 );
155
+ }
163
156
test_varying_whitespace( @single , @percent_op , @scalar );
164
157
test_varying_whitespace( @single , @percent_op , @hashctor3 );
165
158
test_varying_whitespace( @single , @ampersand_op , @scalar );
166
159
test_varying_whitespace( @single , @ampersand_op , @hashctor3 );
167
160
168
161
my @double = ( ' "3"' , [ ' PPI::Token::Quote::Double' => ' "3"' , ] );
169
162
test_varying_whitespace( @double , @asterisk_op , @scalar );
163
+ {
164
+ local %known_bad_seps = map { $_ => 1 } qw( null ) ;
170
165
test_varying_whitespace( @double , @asterisk_op , @hashctor3 );
166
+ }
171
167
test_varying_whitespace( @double , @percent_op , @scalar );
172
168
test_varying_whitespace( @double , @percent_op , @hashctor3 );
173
169
test_varying_whitespace( @double , @ampersand_op , @scalar );
174
170
test_varying_whitespace( @double , @ampersand_op , @hashctor3 );
175
- }
176
171
177
172
test_varying_whitespace( @scalar , @asterisk_op , @scalar );
178
- {
179
- local %known_bad_seps = map { $_ => 1 } qw( null ) ;
180
173
test_varying_whitespace( @scalar , @percent_op , @scalar );
181
174
test_varying_whitespace( @scalar , @ampersand_op , @scalar );
182
175
@@ -192,7 +185,7 @@ OPERATOR_CAST: {
192
185
]
193
186
);
194
187
{
195
- local %known_bad_seps = ( %known_bad_seps , map { $_ => 1 } qw( space ) );
188
+ local %known_bad_seps = map { $_ => 1 } qw( null space ) ;
196
189
test_varying_whitespace( @package , @asterisk_cast , @scalar , 1 );
197
190
test_varying_whitespace( @package , @asterisk_cast , @hashctor3 , 1 );
198
191
test_varying_whitespace( @package , @percent_cast , @scalar , 1 );
@@ -201,7 +194,6 @@ OPERATOR_CAST: {
201
194
test_varying_whitespace( @package , @ampersand_cast , @hashctor3 , 1 );
202
195
test_varying_whitespace( @package , @at_cast , @scalar , 1 );
203
196
test_varying_whitespace( @package , @at_cast , @listctor , 1 );
204
- }
205
197
}
206
198
207
199
my @sub = (
@@ -300,10 +292,11 @@ OPERATOR_CAST: {
300
292
' PPI::Token::Structure' => ' }' ,
301
293
]
302
294
);
295
+ test_varying_whitespace( @evalblock , @asterisk_op , @scalar );
303
296
{
304
297
local %known_bad_seps = map { $_ => 1 } qw( null ) ;
305
- test_varying_whitespace( @evalblock , @asterisk_op , @scalar );
306
298
test_varying_whitespace( @evalblock , @asterisk_op , @hashctor3 );
299
+ }
307
300
test_varying_whitespace( @evalblock , @percent_op , @scalar );
308
301
test_varying_whitespace( @evalblock , @percent_op , @hashctor3 );
309
302
test_varying_whitespace( @evalblock , @ampersand_op , @scalar );
@@ -317,12 +310,14 @@ OPERATOR_CAST: {
317
310
]
318
311
);
319
312
test_varying_whitespace( @evalstring , @asterisk_op , @scalar );
313
+ {
314
+ local %known_bad_seps = map { $_ => 1 } qw( null ) ;
320
315
test_varying_whitespace( @evalstring , @asterisk_op , @hashctor3 );
316
+ }
321
317
test_varying_whitespace( @evalstring , @percent_op , @scalar );
322
318
test_varying_whitespace( @evalstring , @percent_op , @hashctor3 );
323
319
test_varying_whitespace( @evalstring , @ampersand_op , @scalar );
324
320
test_varying_whitespace( @evalstring , @ampersand_op , @hashctor3 );
325
- }
326
321
327
322
my @curly_subscript1 = (
328
323
' $y->{x}' ,
@@ -383,8 +378,6 @@ OPERATOR_CAST: {
383
378
]
384
379
);
385
380
386
- {
387
- local %known_bad_seps = map { $_ => 1 } qw( null ) ;
388
381
test_varying_whitespace( @curly_subscript1 , @asterisk_op , @scalar );
389
382
test_varying_whitespace( @curly_subscript1 , @percent_op , @scalar );
390
383
test_varying_whitespace( @curly_subscript1 , @ampersand_op , @scalar );
@@ -394,13 +387,9 @@ OPERATOR_CAST: {
394
387
test_varying_whitespace( @curly_subscript3 , @asterisk_op , @scalar );
395
388
test_varying_whitespace( @curly_subscript3 , @percent_op , @scalar );
396
389
test_varying_whitespace( @curly_subscript3 , @ampersand_op , @scalar );
397
- }
398
390
test_varying_whitespace( @square_subscript1 , @asterisk_op , @scalar );
399
- {
400
- local %known_bad_seps = map { $_ => 1 } qw( null ) ;
401
391
test_varying_whitespace( @square_subscript1 , @percent_op , @scalar );
402
392
test_varying_whitespace( @square_subscript1 , @ampersand_op , @scalar );
403
- }
404
393
405
394
{
406
395
local %known_bad_seps = map { $_ => 1 } qw( space ) ;
@@ -411,8 +400,6 @@ OPERATOR_CAST: {
411
400
test_varying_whitespace( ' values' , [ ' PPI::Token::Word' => ' values' ], @percent_cast , @hashctor3 );
412
401
}
413
402
414
- TODO: {
415
- local $TODO = " known bug" ;
416
403
test_statement(
417
404
' } *$a' , # unbalanced '}' before '*', arbitrary decision
418
405
[
@@ -423,7 +410,6 @@ TODO: {
423
410
' PPI::Token::Symbol' => ' $a' ,
424
411
]
425
412
);
426
- }
427
413
428
414
test_statement(
429
415
' $bar = \%*$foo' , # multiple consecutive casts
@@ -437,8 +423,6 @@ TODO: {
437
423
]
438
424
);
439
425
440
- TODO: {
441
- local $TODO = " known bug" ;
442
426
test_statement(
443
427
' $#tmp*$#tmp2' ,
444
428
[
@@ -447,7 +431,6 @@ TODO: {
447
431
' PPI::Token::ArrayIndex' => ' $#tmp2' ,
448
432
]
449
433
);
450
- }
451
434
452
435
test_statement(
453
436
' [ %{$req->parameters} ]' , # preceded by '['
@@ -484,8 +467,6 @@ TODO: {
484
467
]
485
468
);
486
469
487
- TODO: {
488
- local $TODO = " known bug" ;
489
470
test_statement(
490
471
' ++$i%$f' , # '%' wrongly a cast through 1.220.
491
472
[
@@ -496,7 +477,6 @@ TODO: {
496
477
' PPI::Token::Symbol' => ' $f' ,
497
478
]
498
479
);
499
- }
500
480
501
481
{ # these need to be fixed in PPI::Lexer->_statement, fixing these will break other tests that need to be changed
502
482
local $TODO = " clarify type of statement in constructor" ;
0 commit comments