summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-09-25 14:27:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-25 14:27:01 +0000
commit69026470e9d2e2c7bf7b03f351d6e98a6d6f29f3 (patch)
treec194809a1212142d6e379732826ee7e74db2bded /t/op
parent81ba8d9690fde862b2e9f40e3edd1700854de746 (diff)
downloadperl-69026470e9d2e2c7bf7b03f351d6e98a6d6f29f3.tar.gz
Replace the use Test::More in t/{op,io,run} with t/test.pl.
Note: io/binmode is failing, have to figure out why. p4raw-id: //depot/perl@12198
Diffstat (limited to 't/op')
-rw-r--r--t/op/chdir.t6
-rw-r--r--t/op/crypt.t22
-rw-r--r--t/op/inccode.t8
-rwxr-xr-xt/op/rand.t6
-rw-r--r--t/op/srand.t9
-rwxr-xr-xt/op/ver.t6
6 files changed, 32 insertions, 25 deletions
diff --git a/t/op/chdir.t b/t/op/chdir.t
index af13e80518..b44cd6f665 100644
--- a/t/op/chdir.t
+++ b/t/op/chdir.t
@@ -2,9 +2,11 @@ BEGIN {
# We're not going to chdir() into 't' because we don't know if
# chdir() works! Instead, we'll hedge our bets and put both
# possibilities into @INC.
- @INC = ('lib', '../lib');
+ @INC = qw(t . lib ../lib);
}
+require "test.pl";
+plan(tests => 25);
# Might be a little early in the testing process to start using these,
# but I can't think of a way to write this test without them.
@@ -16,8 +18,6 @@ sub abs_path {
rel2abs(curdir);
}
-use Test::More tests => 25;
-
my $cwd = abs_path;
# Let's get to a known position
diff --git a/t/op/crypt.t b/t/op/crypt.t
index 8326a09626..8beb41d498 100644
--- a/t/op/crypt.t
+++ b/t/op/crypt.t
@@ -1,20 +1,20 @@
-#!./perl -Tw
+#!./perl -w
BEGIN {
chdir 't' if -d 't';
- @INC = ('../lib');
+ @INC = qw(. ../lib);
}
-use Config;
-
BEGIN {
- require Test::More;
+ use Config;
+
+ require "test.pl";
if( !$Config{d_crypt} ) {
- Test::More->import('skip_all');
+ skip_all("crypt unimplemented");
}
else {
- Test::More->import(tests => 2);
+ plan(tests => 2);
}
}
@@ -28,10 +28,6 @@ BEGIN {
# bets, given alternative encryption/hashing schemes like MD5,
# C2 (or higher) security schemes, and non-UNIX platforms.
-SKIP: {
- skip "crypt unimplemented", 2, unless $Config{d_crypt};
-
- ok(substr(crypt("ab", "cd"), 2) ne substr(crypt("ab", "ce"), 2), "salt makes a difference");
+ok(substr(crypt("ab", "cd"), 2) ne substr(crypt("ab", "ce"), 2), "salt makes a difference");
- ok(crypt("HI", "HO") eq crypt(join("",map{chr($_+256)}unpack"C*","HI"), "HO"), "low eight bits of Unicode");
-}
+ok(crypt("HI", "HO") eq crypt(join("",map{chr($_+256)}unpack"C*","HI"), "HO"), "low eight bits of Unicode");
diff --git a/t/op/inccode.t b/t/op/inccode.t
index 71beb3e9e9..3ccea1a0a4 100644
--- a/t/op/inccode.t
+++ b/t/op/inccode.t
@@ -1,14 +1,16 @@
-#!./perl -wT
+#!./perl -w
# Tests for the coderef-in-@INC feature
BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
+ @INC = qw(. ../lib);
}
use File::Spec;
-use Test::More tests => 39;
+
+require "test.pl";
+plan(tests => 39);
my @tempfiles = ();
diff --git a/t/op/rand.t b/t/op/rand.t
index 44bf0ff2e4..060d46a714 100755
--- a/t/op/rand.t
+++ b/t/op/rand.t
@@ -17,12 +17,14 @@
BEGIN {
chdir "t" if -d "t";
- @INC = '../lib';
+ @INC = qw(. ../lib);
}
use strict;
use Config;
-use Test::More tests => 8;
+
+require "test.pl";
+plan(tests => 8);
my $reps = 10000; # How many times to try rand each time.
diff --git a/t/op/srand.t b/t/op/srand.t
index bbd0e54845..e809673020 100644
--- a/t/op/srand.t
+++ b/t/op/srand.t
@@ -1,9 +1,16 @@
#!./perl -w
+BEGIN {
+ chdir "t" if -d "t";
+ @INC = qw(. ../lib);
+}
+
# Test srand.
use strict;
-use Test::More tests => 4;
+
+require "test.pl";
+plan(tests => 4);
# Generate a load of random numbers.
# int() avoids possible floating point error.
diff --git a/t/op/ver.t b/t/op/ver.t
index f64cf47579..31bd09c0fd 100755
--- a/t/op/ver.t
+++ b/t/op/ver.t
@@ -2,7 +2,7 @@
BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
+ @INC = qw(. ../lib);
$SIG{'__WARN__'} = sub { warn $_[0] if $DOWARN };
}
@@ -11,8 +11,8 @@ $DOWARN = 1; # enable run-time warnings now
use Config;
$tests = $Config{'uvsize'} == 8 ? 47 : 44;
-require Test::More;
-Test::More->import( tests => $tests );
+require "test.pl";
+plan( tests => $tests );
eval { use v5.5.640; };
is( $@, '', "use v5.5.640; $@");