Skip to content

Commit

Permalink
fix typo in comp/parser.t
Browse files Browse the repository at this point in the history
3 similar tests eval a sub with a list of variables, $r is repeated at the
end of the list, but the errors that are being checked have nothing to do with
the repeated variable. This causes a warning enabled.
  • Loading branch information
brainbuz authored and tonycoz committed Nov 23, 2020
1 parent 4281700 commit a5fba4f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions t/comp/parser.t
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ eval q[
like($@, qr/Missing right curly/, 'nested sub syntax error' );

eval q[
sub { my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$r);
sub { my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s);
sub { my $z
];
like($@, qr/Missing right curly/, 'nested sub syntax error 2' );
Expand All @@ -256,7 +256,7 @@ eval q[
like($@, qr/Can't locate DieDieDie.pm/, 'croak cleanup' );

eval q[
sub { my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$r);
sub { my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s);
use DieDieDie;
];

Expand All @@ -265,7 +265,7 @@ like($@, qr/Can't locate DieDieDie.pm/, 'croak cleanup 2' );

eval q[
my @a;
my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$r);
my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s);
@a =~ s/a/b/; # compile-time error
use DieDieDie;
];
Expand Down Expand Up @@ -639,10 +639,10 @@ check($this_file, 3, "bare line");
# line 5
check($this_file, 5, "bare line with leading space");
#line 7
#line 7
check($this_file, 7, "trailing space still valid");
# line 11
# line 11
check($this_file, 11, "leading and trailing");
# line 13
Expand All @@ -666,7 +666,7 @@ check(qr/^CLINK CLOINK BZZT$/, 31, "filename with spaces in quotes");
#line 37 "THOOM THOOM"
check(qr/^THOOM THOOM$/, 37, "filename with tabs in quotes");
#line 41 "GLINK PLINK GLUNK DINK"
#line 41 "GLINK PLINK GLUNK DINK"
check(qr/^GLINK PLINK GLUNK DINK$/, 41, "a space after the quotes");
#line 43 "BBFRPRAFPGHPP
Expand Down

0 comments on commit a5fba4f

Please sign in to comment.