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 12ad0b0..61cc4b2 100644 (file)
--- a/lib/if.t
+++ b/lib/if.t
@@ -5,7 +5,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-use Test::More tests => 4;
+use Test::More tests => 6;
 
 my $v_plus = $] + 1;
 my $v_minus = $] - 1;
@@ -24,3 +24,8 @@ ok( (not defined eval "use if ($v_plus > \$]), strict => 'refs'; \${'f'} = 12"
      and $@ =~ /while "strict refs" in use/),
     '"use if" with a true condition and a pragma');
 
+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');