diff options
Diffstat (limited to 't/lib/strict/subs')
-rw-r--r-- | t/lib/strict/subs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 87311f8a16..84bf874b25 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -432,3 +432,13 @@ ret foo: ret bar +######## +# infinite loop breaks some strict checking +use strict 'subs'; +sub foo { + 1 while 1; + kill FOO, 1; +} +EXPECT +Bareword "FOO" not allowed while "strict subs" in use at - line 5. +Execution of - aborted due to compilation errors. |