summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorGraham Knop <haarg@haarg.org>2022-05-16 19:08:05 +0200
committerGraham Knop <haarg@haarg.org>2022-05-30 11:42:45 +0200
commit421e9cf4821e5243d998393e3ba3ecdb8fddebc6 (patch)
treee183eeddf0b7d38523d9eb7c2eb9b3263b114d73 /dist
parent2eed45ecf025da431cc0d641fdd41def0a6290ec (diff)
downloadperl-421e9cf4821e5243d998393e3ba3ecdb8fddebc6.tar.gz
encoding-warnings: convert tests to use Test::More rather than Test.pm
Diffstat (limited to 'dist')
-rw-r--r--dist/encoding-warnings/t/1-warning.t7
-rw-r--r--dist/encoding-warnings/t/2-fatal.t4
-rw-r--r--dist/encoding-warnings/t/3-normal.t4
-rw-r--r--dist/encoding-warnings/t/4-lexical.t5
4 files changed, 11 insertions, 9 deletions
diff --git a/dist/encoding-warnings/t/1-warning.t b/dist/encoding-warnings/t/1-warning.t
index 9b53d4d1eb..713b2b5e89 100644
--- a/dist/encoding-warnings/t/1-warning.t
+++ b/dist/encoding-warnings/t/1-warning.t
@@ -13,8 +13,9 @@ BEGIN {
}
}
-use Test;
use strict;
+use warnings;
+use Test::More;
BEGIN {
if ("$]" >= 5.025) {
@@ -23,10 +24,10 @@ BEGIN {
my $w;
$SIG{__WARN__} = sub { $w .= shift };
require encoding::warnings;
- ok $w, undef, 'no warning from requiring encoding::warnings';
+ is $w, undef, 'no warning from requiring encoding::warnings';
ok(encoding::warnings->VERSION);
encoding::warnings->import;
- ok $w, qr/^encoding::warnings is not supported /, 'import warning';
+ like $w, qr/^encoding::warnings is not supported /, 'import warning';
exit;
}
# else continue with your usual scheduled testing...
diff --git a/dist/encoding-warnings/t/2-fatal.t b/dist/encoding-warnings/t/2-fatal.t
index 60070d2d83..856870b98c 100644
--- a/dist/encoding-warnings/t/2-fatal.t
+++ b/dist/encoding-warnings/t/2-fatal.t
@@ -17,10 +17,10 @@ BEGIN {
}
}
-use Test;
-BEGIN { plan tests => 2 }
+use Test::More tests => 2;
use strict;
+use warnings;
use encoding::warnings 'FATAL';
ok(encoding::warnings->VERSION);
diff --git a/dist/encoding-warnings/t/3-normal.t b/dist/encoding-warnings/t/3-normal.t
index 2714033578..4aaea83020 100644
--- a/dist/encoding-warnings/t/3-normal.t
+++ b/dist/encoding-warnings/t/3-normal.t
@@ -5,10 +5,10 @@ BEGIN {
}
}
-use Test;
-BEGIN { plan tests => 2 }
+use Test::More tests => 2;
use strict;
+use warnings;
use encoding::warnings 'FATAL';
ok(encoding::warnings->VERSION);
diff --git a/dist/encoding-warnings/t/4-lexical.t b/dist/encoding-warnings/t/4-lexical.t
index 491dbf8ee2..89a1a86e2e 100644
--- a/dist/encoding-warnings/t/4-lexical.t
+++ b/dist/encoding-warnings/t/4-lexical.t
@@ -1,5 +1,5 @@
use strict;
-use Test;
+use warnings;
BEGIN {
if ("$]" >= 5.025) {
print "1..0 # Skip: encoding::warnings not supported on perl 5.26\n";
@@ -15,9 +15,10 @@ BEGIN {
exit 0;
}
- plan tests => 3;
}
+use Test::More tests => 3;
+
{
use encoding::warnings;
ok(encoding::warnings->VERSION);