summaryrefslogtreecommitdiff
path: root/ext/Pod-Html/t/anchorify.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Pod-Html/t/anchorify.t')
-rw-r--r--ext/Pod-Html/t/anchorify.t16
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/Pod-Html/t/anchorify.t b/ext/Pod-Html/t/anchorify.t
index 03d87f80d6..2778cf04f6 100644
--- a/ext/Pod-Html/t/anchorify.t
+++ b/ext/Pod-Html/t/anchorify.t
@@ -1,8 +1,8 @@
# -*- perl -*-
use strict;
-use Pod::Html::Util qw( anchorify );
-use Test::More tests => 1;
+use Pod::Html::Util qw( anchorify relativize_url );
+use Test::More tests => 3;
my @filedata;
{
@@ -43,6 +43,18 @@ is_deeply(
"Got expected POD heads"
);
+{
+ # adapted from 'installhtml'
+ my $file = '/home/username/tmp/installhtml/pod/perlipc';
+ my $capture = 'NAME';
+ my $expected_url = '/home/username/tmp/installhtml/pod/perlipc/NAME.html';
+ my $expected_relativized_url = 'perlipc/NAME.html';
+ my $url = "$file/@{[anchorify(qq($capture))]}.html" ;
+ is($url, $expected_url, "anchorify() returned expected value");
+ my $relativized_url = relativize_url( $url, "$file.html" );
+ is($relativized_url, $expected_relativized_url, "relativize_url() returned expected value");
+}
+
__DATA__
=head1 NAME