summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Knop <haarg@haarg.org>2022-10-10 19:38:19 +0200
committerOlaf Alders <olaf@wundersolutions.com>2022-10-10 16:35:44 -0400
commit5a628e820f57eae410fcceab949deef90887a384 (patch)
treee4d98b7ecfed349f0d31a8e840c737a6097ffade
parent72a9be7c6d29a6b807fa0a726429e9ca8c93c184 (diff)
downloaduri-5a628e820f57eae410fcceab949deef90887a384.tar.gz
test cleanups
Make a few small test cleanups. Use done_testing rather than an explicit plan in escape.t and scheme-exceptions.t and remove the bogus +x on path-segments.t Also update scheme-exceptions.t to use a more obviously invalid URI scheme.
-rw-r--r--t/escape.t4
-rw-r--r--[-rwxr-xr-x]t/path-segments.t0
-rw-r--r--t/scheme-exceptions.t9
3 files changed, 8 insertions, 5 deletions
diff --git a/t/escape.t b/t/escape.t
index 63dfb06..d78155b 100644
--- a/t/escape.t
+++ b/t/escape.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More;
use URI::Escape qw( %escapes uri_escape uri_escape_utf8 uri_unescape );
@@ -83,3 +83,5 @@ ok !eval { print uri_escape("abc" . chr(300)); 1 };
like $@, qr/^Can\'t escape \\x\{012C\}, try uri_escape_utf8\(\) instead/;
is uri_escape_utf8(chr(0xFFF)), "%E0%BF%BF";
+
+done_testing;
diff --git a/t/path-segments.t b/t/path-segments.t
index ea9b4fa..ea9b4fa 100755..100644
--- a/t/path-segments.t
+++ b/t/path-segments.t
diff --git a/t/scheme-exceptions.t b/t/scheme-exceptions.t
index e1cb568..e400591 100644
--- a/t/scheme-exceptions.t
+++ b/t/scheme-exceptions.t
@@ -4,13 +4,14 @@ use warnings;
use Test::More;
use URI ();
-plan skip_all => 'this test assumes that URI::javascript does not exist'
- if eval { +require URI::javascript };
-plan tests => 4;
+plan skip_all => 'this test assumes that URI::notreal does not exist'
+ if eval { +require URI::notreal };
for (0..1) {
- my $uri = URI->new('javascript://foo/bar');
+ my $uri = URI->new('notreal://foo/bar');
is($@, '', 'no exception when trying to load a scheme handler class');
ok($uri->isa('URI'), 'but URI still instantiated as foreign');
}
+
+done_testing;