summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorVincent Pit <vince@profvince.com>2009-11-28 13:27:02 +0100
committerVincent Pit <vince@profvince.com>2009-11-28 13:27:02 +0100
commit17c59fdf7540adaf656e96fe6d48b58dab391dc0 (patch)
tree8ebc8c43e0cc725ea00bee7431183cac05cbe5fc /t
parent162177c1aed1991639f7f0da64e918c034e1148a (diff)
downloadperl-17c59fdf7540adaf656e96fe6d48b58dab391dc0.tar.gz
Allow a closing brace after an "use VERSION"
This fixes [perl #70884] : use VERSION in BLOCK without semicolon -> syntax error
Diffstat (limited to 't')
-rwxr-xr-xt/comp/use.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/comp/use.t b/t/comp/use.t
index fade9fec1a..c9b76d79a4 100755
--- a/t/comp/use.t
+++ b/t/comp/use.t
@@ -6,7 +6,7 @@ BEGIN {
$INC{"feature.pm"} = 1; # so we don't attempt to load feature.pm
}
-print "1..69\n";
+print "1..73\n";
# Can't require test.pl, as we're testing the use/require mechanism here.
@@ -62,6 +62,18 @@ sub isnt ($$;$) {
_ok ('isnt', @_);
}
+eval "use 5"; # implicit semicolon
+is ($@, '');
+
+eval "use 5;";
+is ($@, '');
+
+eval "{use 5}"; # [perl #70884]
+is ($@, '');
+
+eval "{use 5 }"; # [perl #70884]
+is ($@, '');
+
# new style version numbers
eval q{ use v5.5.630; };