From c9e0c59bcb20d0c489480be8a6af98bbb64c28d2 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 4 Jan 2010 11:23:55 +0000 Subject: [PATCH] Following fd909433c7437296, check that {sub f} correctly stubs the subroutine. --- t/comp/parser.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/comp/parser.t b/t/comp/parser.t index 65315bc..16d7b82 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..118\n"; +print "1..121\n"; sub failed { my ($got, $expected, $name) = @_; @@ -334,8 +334,11 @@ like($@, qr/BEGIN failed--compilation aborted/, 'BEGIN 7' ); } { + is(exists &zlonk, '', 'sub not present'); eval qq[ {sub zlonk} ]; is($@, '', 'sub declaration followed by a closing curly'); + is(exists &zlonk, 1, 'sub now stubbed'); + is(defined &zlonk, '', 'but no body defined'); } # Add new tests HERE: -- 2.7.4