6 use Test
::More
'no_plan';
8 use Git
::SVN
::Utils
qw(
12 # A reference cannot be a hash key, so we use an array.
14 ["http://x.com", "bar"] => 'http://x.com/bar',
15 ["http://x.com", ""] => 'http://x.com',
16 ["http://x.com/foo/", undef] => 'http://x.com/foo/',
17 ["http://x.com/foo/", "/bar/baz/"] => 'http://x.com/foo/bar/baz/',
18 ["http://x.com", 'per%cent'] => 'http://x.com/per%25cent',
22 my($have, $want) = splice @tests, 0, 2;
24 my $args = join ", ", map { qq['$_'] } map { defined($_) ?
$_ : 'undef' } @
$have;
25 my $name = "add_path_to_url($args) eq $want";
26 is add_path_to_url
(@
$have), $want, $name;