This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the 'slow ok' feature optional.
[perl5.git] / lib / if.t
index 3e75718..61cc4b2 100644 (file)
--- a/lib/if.t
+++ b/lib/if.t
@@ -5,7 +5,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-use Test::More tests => 5;
+use Test::More tests => 6;
 
 my $v_plus = $] + 1;
 my $v_minus = $] - 1;
@@ -27,3 +27,5 @@ ok( (not defined eval "use if ($v_plus > \$]), strict => 'refs'; \${'f'} = 12"
 ok( eval "use if 1, Cwd; cwd() || 1;",
     '"use if" with a true condition, module, no arguments, exports');
 
+ok( eval "use if qw/ 1 if 1 strict subs /; \${'f'} = 12" eq 12,
+    '"use if" with a module named after keyword');