summaryrefslogtreecommitdiff
path: root/lib/if.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-13 16:30:18 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-13 16:30:18 +0100
commit00c2f0c97c1956309eb5a69763c48663bca3a767 (patch)
treec4f78439bbdbf32c4cc92664269ad2651435ee30 /lib/if.t
parent359ab69c2e6e9e71dc5be4023a8ee521e8795dac (diff)
downloadperl-00c2f0c97c1956309eb5a69763c48663bca3a767.tar.gz
Move if from lib to ext.
Diffstat (limited to 'lib/if.t')
-rw-r--r--lib/if.t41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/if.t b/lib/if.t
deleted file mode 100644
index d09de5895c..0000000000
--- a/lib/if.t
+++ /dev/null
@@ -1,41 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' and @INC = '../lib' if $ENV{PERL_CORE};
-}
-
-my $t = 1;
-print "1..5\n";
-sub ok {
- print "not " unless shift;
- print "ok $t # ", shift, "\n";
- $t++;
-}
-
-my $v_plus = $] + 1;
-my $v_minus = $] - 1;
-
-unless (eval 'use open ":std"; 1') {
- # pretend that open.pm is present
- $INC{'open.pm'} = 'open.pm';
- eval 'sub open::foo{}'; # Just in case...
-}
-
-
-ok( eval "use if ($v_minus > \$]), strict => 'subs'; \${'f'} = 12" eq 12,
- '"use if" with a false condition, fake pragma');
-
-ok( eval "use if ($v_minus > \$]), strict => 'refs'; \${'f'} = 12" eq 12,
- '"use if" with a false condition and a pragma');
-
-ok( eval "use if ($v_plus > \$]), strict => 'subs'; \${'f'} = 12" eq 12,
- '"use if" with a true condition, fake pragma');
-
-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');
-
-# Old version had problems with the module name `open', which is a keyword too
-# Use 'open' =>, since pre-5.6.0 could interpret differently
-ok( (eval "use if ($v_plus > \$]), 'open' => IN => ':crlf'; 12" || 0) eq 12,
- '"use if" with open');