summaryrefslogtreecommitdiff
path: root/t/pragma/strict-subs
diff options
context:
space:
mode:
Diffstat (limited to 't/pragma/strict-subs')
-rw-r--r--t/pragma/strict-subs18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/pragma/strict-subs b/t/pragma/strict-subs
index deeb381473..ed4fe7a443 100644
--- a/t/pragma/strict-subs
+++ b/t/pragma/strict-subs
@@ -33,6 +33,24 @@ Execution of - aborted due to compilation errors.
########
# strict subs - error
+use strict 'subs' ;
+my @a = (A..Z);
+EXPECT
+Bareword "Z" not allowed while "strict subs" in use at - line 4.
+Bareword "A" not allowed while "strict subs" in use at - line 4.
+Execution of - aborted due to compilation errors.
+########
+
+# strict subs - error
+use strict 'subs' ;
+my $a = (B..Y);
+EXPECT
+Bareword "Y" not allowed while "strict subs" in use at - line 4.
+Bareword "B" not allowed while "strict subs" in use at - line 4.
+Execution of - aborted due to compilation errors.
+########
+
+# strict subs - error
use strict ;
Fred ;
EXPECT