summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2017-07-26 12:04:18 +1000
committerTony Cook <tony@develop-help.com>2017-08-17 10:46:45 +1000
commit36000cd1c47863d8412b285701db7232dd450239 (patch)
treed3e8cd50c1fdbedf487a0f94801c78f52cbcf35e /t/comp
parent7b0b49a788000e00f19945fc6d7f28c1f368ac03 (diff)
downloadperl-36000cd1c47863d8412b285701db7232dd450239.tar.gz
(perl #131793) sanely handle PL_linestart > PL_bufptr
In the test case, scan_ident() ends up fetching another line (updating PL_linestart), and since in this case we don't successfully parse ${identifier} s (and PL_bufptr) end up being before PL_linestart.
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/parser_run.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/comp/parser_run.t b/t/comp/parser_run.t
index e74644d3fb..0fca5b2800 100644
--- a/t/comp/parser_run.t
+++ b/t/comp/parser_run.t
@@ -10,7 +10,7 @@ BEGIN {
}
require './test.pl';
-plan(1);
+plan(2);
# [perl #130814] can reallocate lineptr while looking ahead for
# "Missing $ on loop variable" diagnostic.
@@ -24,5 +24,12 @@ syntax error at - line 3, near "foreach m0
Identifier too long at - line 3.
EXPECT
+fresh_perl_is(<<EOS, <<'EXPECT', {}, "linestart before bufptr");
+\${ \xD5eeeeeeeeeeee
+'x
+EOS
+Unrecognized character \xD5; marked by <-- HERE after ${ <-- HERE near column 4 at - line 1.
+EXPECT
+
__END__
# ex: set ts=8 sts=4 sw=4 et: