summaryrefslogtreecommitdiff
path: root/t/scheme-exceptions.t
diff options
context:
space:
mode:
Diffstat (limited to 't/scheme-exceptions.t')
-rw-r--r--t/scheme-exceptions.t16
1 files changed, 16 insertions, 0 deletions
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');
+}