diff --git a/t/comp/parser_run.t b/t/comp/parser_run.t index 1f90e2b15ee8..770063469fc1 100644 --- a/t/comp/parser_run.t +++ b/t/comp/parser_run.t @@ -10,7 +10,7 @@ BEGIN { set_up_inc( qw(. ../lib ) ); } -plan(7); +plan(14); # [perl #130814] can reallocate lineptr while looking ahead for # "Missing $ on loop variable" diagnostic. @@ -22,11 +22,16 @@ is($result . "\n", <= e) - Perl_croak(aTHX_ "%s", ident_too_long); - *d= *s++; - } - if (is_zero && d - digit_start > 1) - Perl_croak(aTHX_ ident_var_zero_multi_digit); - } d[1] = '\0'; } } + + /* make sure that we dont have a var starting with two zero digits + * which is not allowed as it introduces confusion with octal and + * decimal. */ + if (*d == '0' && *s == '0') + Perl_croak(aTHX_ ident_var_zero_multi_digit); + /* Convert $^F, ${^F} and the ^F of ${^FOO} to control characters */ if (*d == '^' && *s && isCONTROLVAR(*s)) { *d = toCTRL(*s);