diff options
author | Hugo van der Sanden <hv@crypt.org> | 2017-02-19 11:15:38 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2017-02-21 11:58:45 +0000 |
commit | d7186addd1b477f6bdcef5e9d24f2125691a9082 (patch) | |
tree | 3844a1823cf64182da1cbd66c78f9094e0f4aa56 /t/comp/parser_run.t | |
parent | b289efd9cce518a9889bdd049e2d9dad508e6bee (diff) | |
download | perl-d7186addd1b477f6bdcef5e9d24f2125691a9082.tar.gz |
[perl #130814] Add testcase, and new testfile t/comp/parser_run.t
Sometimes it's useful to have test.pl around, but it seems inappropriate
to pollute the existing t/comp/parser.t with that.
Diffstat (limited to 't/comp/parser_run.t')
-rw-r--r-- | t/comp/parser_run.t | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/comp/parser_run.t b/t/comp/parser_run.t new file mode 100644 index 0000000000..2543f499b5 --- /dev/null +++ b/t/comp/parser_run.t @@ -0,0 +1,28 @@ +#!./perl + +# Parser tests that want test.pl, eg to use runperl() for tests to show +# reads through invalid pointers. +# Note that this should still be runnable under miniperl. + +BEGIN { + @INC = qw(. ../lib ); + chdir 't' if -d 't'; +} + +require './test.pl'; +plan(1); + +# [perl #130814] can reallocate lineptr while looking ahead for +# "Missing $ on loop variable" diagnostic. +my $result = runperl( + prog => " foreach m0\n\$" . ("0" x 0x2000), + stderr => 1, +); +is($result, <<EXPECT); +syntax error at -e line 3, near "foreach m0 +" +Identifier too long at -e line 3. +EXPECT + +__END__ +# ex: set ts=8 sts=4 sw=4 et: |