summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Raspass <jraspass@gmail.com>2022-08-20 15:41:14 +0100
committerOlaf Alders <olaf@wundersolutions.com>2022-08-20 17:39:34 -0400
commit9cc1f62cb927c7a022f3f3b0d30c6e3f9a06a924 (patch)
tree493d01d50057618aca2f1b2cf687a4e195329d70
parent8bd9cdb4ebe2475c5f7dba1a2d103ef0e17afaea (diff)
downloaduri-9cc1f62cb927c7a022f3f3b0d30c6e3f9a06a924.tar.gz
Replace "Test" with "Test::More"
-rw-r--r--Changes1
-rw-r--r--cpanfile1
-rw-r--r--t/roy-test.t9
3 files changed, 5 insertions, 6 deletions
diff --git a/Changes b/Changes
index eba5e34..ccc97a9 100644
--- a/Changes
+++ b/Changes
@@ -4,6 +4,7 @@ Revision history for URI
- Regression test added for a previous bug (5.11) in URI::file (Perlbotics).
file() method of URI::file can return the current working directory
instead of the properly unescaped path. (GH#106) (Perlbotics)
+ - Replace "Test" with "Test::More" (GH#107) (James Raspass)
5.12 2022-07-10 23:48:50Z
- Fix an issue where i.e. 'file:///tmp/###' was not properly escaped.
diff --git a/cpanfile b/cpanfile
index 7c10d15..0aebb4f 100644
--- a/cpanfile
+++ b/cpanfile
@@ -45,7 +45,6 @@ on 'runtime' => sub {
on 'test' => sub {
requires "File::Spec::Functions" => "0";
requires "File::Temp" => "0";
- requires "Test" => "0";
requires "Test::More" => "0.96";
requires "Test::Needs" => '0';
requires "utf8" => "0";
diff --git a/t/roy-test.t b/t/roy-test.t
index db06c26..d2b78f4 100644
--- a/t/roy-test.t
+++ b/t/roy-test.t
@@ -1,8 +1,7 @@
use strict;
use warnings;
-use Test qw(ok plan);
-plan tests => 102;
+use Test::More tests => 102;
use URI ();
use File::Spec::Functions qw(catfile);
@@ -16,13 +15,13 @@ for my $i (1..5) {
my $file = catfile(@prefix, "roytest$i.html");
open(FILE, $file) || die "Can't open $file: $!";
- print "# $file\n";
+ note $file;
my $base = undef;
while (<FILE>) {
if (/^<BASE href="([^"]+)">/) {
$base = URI->new($1);
} elsif (/^<a href="([^"]*)">.*<\/a>\s*=\s*(\S+)/) {
- die "Missing base at line $." unless $base;
+ die "Missing base at line $." unless $base;
my $link = $1;
my $exp = $2;
$exp = $base if $exp =~ /current/; # special case test 22
@@ -35,7 +34,7 @@ for my $i (1..5) {
$exp = "http://a/b/c/d;p?y";
}
- ok(URI->new($link)->abs($base), $exp);
+ is(URI->new($link)->abs($base), $exp);
$no++;
}