diff options
author | Vincent Pit <perl@profvince.com> | 2010-01-03 16:33:35 +0100 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2010-01-03 16:33:35 +0100 |
commit | fd909433c74372968d34d9cad8f4458ab60e19b4 (patch) | |
tree | a4c80056370fda124a32dd66e8b887e9fcfa3b32 /t | |
parent | 2484dfd45804d90a4c06fd52415df7023397d17d (diff) | |
download | perl-fd909433c74372968d34d9cad8f4458ab60e19b4.tar.gz |
Allow "{sub f}" to compile
Diffstat (limited to 't')
-rw-r--r-- | t/comp/parser.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t index 05c8d65be9..65315bcfb3 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -3,7 +3,7 @@ # Checks if the parser behaves correctly in edge cases # (including weird syntax errors) -print "1..117\n"; +print "1..118\n"; sub failed { my ($got, $expected, $name) = @_; @@ -333,6 +333,11 @@ like($@, qr/BEGIN failed--compilation aborted/, 'BEGIN 7' ); like($@, qr/Identifier too long/, "too long id ticket case"); } +{ + eval qq[ {sub zlonk} ]; + is($@, '', 'sub declaration followed by a closing curly'); +} + # Add new tests HERE: # More awkward tests for #line. Keep these at the end, as they will screw |