diff options
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | t/scheme-exceptions.t | 16 |
2 files changed, 17 insertions, 0 deletions
@@ -96,6 +96,7 @@ t/roytest4.html t/roytest5.html t/rsync.t t/rtsp.t +t/scheme-exceptions.t t/sip.t t/sort-hash-query-form.t t/split.t diff --git a/t/scheme-exceptions.t b/t/scheme-exceptions.t new file mode 100644 index 0000000..2654d3f --- /dev/null +++ b/t/scheme-exceptions.t @@ -0,0 +1,16 @@ +use strict; +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; + +for (0..1) { + my $uri = URI->new('javascript://foo/bar'); + + is($@, '', 'no exception when trying to load a scheme handler class'); + ok($uri->isa('URI'), 'but URI still instantiated as foreign'); +} |