diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-25 01:06:42 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-25 01:06:42 +0000 |
commit | 9165b237ad8fae18b36d4d40d6e2ccfde7b136c7 (patch) | |
tree | 06530ddd6baa7e251c58b6b6729ed458da61a681 /t/clone.t | |
download | URI-tarball-master.tar.gz |
Diffstat (limited to 't/clone.t')
-rw-r--r-- | t/clone.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/clone.t b/t/clone.t new file mode 100644 index 0000000..57201f5 --- /dev/null +++ b/t/clone.t @@ -0,0 +1,21 @@ +use strict; +use warnings; + +print "1..2\n"; + +use URI::URL; + +my $b = URI::URL->new("http://www/"); + +my $u1 = URI::URL->new("foo", $b); +my $u2 = $u1->clone; + +$u1->base("http://yyy/"); + +#use Data::Dump; Data::Dump::dump($b, $u1, $u2); + +print "not " unless $u1->abs->as_string eq "http://yyy/foo"; +print "ok 1\n"; + +print "not " unless $u2->abs->as_string eq "http://www/foo"; +print "ok 2\n"; |