diff options
author | Graham Knop <haarg@haarg.org> | 2022-10-10 19:38:19 +0200 |
---|---|---|
committer | Olaf Alders <olaf@wundersolutions.com> | 2022-10-10 16:35:44 -0400 |
commit | 5a628e820f57eae410fcceab949deef90887a384 (patch) | |
tree | e4d98b7ecfed349f0d31a8e840c737a6097ffade | |
parent | 72a9be7c6d29a6b807fa0a726429e9ca8c93c184 (diff) | |
download | uri-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.t | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | t/path-segments.t | 0 | ||||
-rw-r--r-- | t/scheme-exceptions.t | 9 |
3 files changed, 8 insertions, 5 deletions
@@ -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; |