1BEGIN {
2    use File::Spec::Functions ':ALL';
3    @INC = map { rel2abs($_) }
4             (qw| ./lib ./t/lib ../../lib |);
5}
6
7use strict;
8use warnings;
9use Test::More;
10use Testing qw( setup_testing_dir xconvert );
11use Cwd;
12
13my $debug = 0;
14my $startdir = cwd();
15END { chdir($startdir) or die("Cannot change back to $startdir: $!"); }
16my ($expect_raw, $args);
17{ local $/; $expect_raw = <DATA>; }
18
19my $tdir = setup_testing_dir( {
20    debug       => $debug,
21} );
22
23$args = {
24    podstub => "htmllink",
25    description => "html links",
26    expect => $expect_raw,
27    debug => 1,
28};
29
30xconvert($args);
31
32done_testing;
33
34__DATA__
35<?xml version="1.0" ?>
36<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
37<html xmlns="http://www.w3.org/1999/xhtml">
38<head>
39<title>htmllink - Test HTML links</title>
40<meta http-equiv="content-type" content="text/html; charset=utf-8" />
41<link rev="made" href="mailto:[PERLADMIN]" />
42</head>
43
44<body>
45
46
47
48<ul id="index">
49  <li><a href="#NAME">NAME</a></li>
50  <li><a href="#LINKS">LINKS</a></li>
51  <li><a href="#TARGETS">TARGETS</a>
52    <ul>
53      <li><a href="#section1">section1</a></li>
54      <li><a href="#section-2">section 2</a></li>
55      <li><a href="#section-three">section three</a></li>
56    </ul>
57  </li>
58</ul>
59
60<h1 id="NAME">NAME</h1>
61
62<p>htmllink - Test HTML links</p>
63
64<h1 id="LINKS">LINKS</h1>
65
66<p><a href="#section1">&quot;section1&quot;</a></p>
67
68<p><a href="#section-2">&quot;section 2&quot;</a></p>
69
70<p><a href="#section-three">&quot;section three&quot;</a></p>
71
72<p><a href="#item1">&quot;item1&quot;</a></p>
73
74<p><a href="#item-2">&quot;item 2&quot;</a></p>
75
76<p><a href="#item-three">&quot;item three&quot;</a></p>
77
78<p><a href="#section1">&quot;section1&quot;</a></p>
79
80<p><a href="#section-2">&quot;section 2&quot;</a></p>
81
82<p><a href="#section-three">&quot;section three&quot;</a></p>
83
84<p><a href="#item1">&quot;item1&quot;</a></p>
85
86<p><a href="#item-2">&quot;item 2&quot;</a></p>
87
88<p><a href="#item-three">&quot;item three&quot;</a></p>
89
90<p><a href="#section1">&quot;section1&quot;</a></p>
91
92<p><a href="#section-2">&quot;section 2&quot;</a></p>
93
94<p><a href="#section-three">&quot;section three&quot;</a></p>
95
96<p><a href="#item1">&quot;item1&quot;</a></p>
97
98<p><a href="#item-2">&quot;item 2&quot;</a></p>
99
100<p><a href="#item-three">&quot;item three&quot;</a></p>
101
102<p><a href="#section1">text</a></p>
103
104<p><a href="#section-2">text</a></p>
105
106<p><a href="#section-three">text</a></p>
107
108<p><a href="#item1">text</a></p>
109
110<p><a href="#item-2">text</a></p>
111
112<p><a href="#item-three">text</a></p>
113
114<p><a href="#section1">text</a></p>
115
116<p><a href="#section-2">text</a></p>
117
118<p><a href="#section-three">text</a></p>
119
120<p><a href="#item1">text</a></p>
121
122<p><a href="#item-2">text</a></p>
123
124<p><a href="#item-three">text</a></p>
125
126<p><a href="#section1">text</a></p>
127
128<p><a href="#section-2">text</a></p>
129
130<p><a href="#section-three">text</a></p>
131
132<p><a href="#item1">text</a></p>
133
134<p><a href="#item-2">text</a></p>
135
136<p><a href="#item-three">text</a></p>
137
138<h1 id="TARGETS">TARGETS</h1>
139
140<h2 id="section1">section1</h2>
141
142<p>This is section one.</p>
143
144<h2 id="section-2">section 2</h2>
145
146<p>This is section two.</p>
147
148<h2 id="section-three">section three</h2>
149
150<p>This is section three.</p>
151
152<dl>
153
154<dt id="item1">item1  </dt>
155<dd>
156
157<p>This is item one.</p>
158
159</dd>
160<dt id="item-2">item 2  </dt>
161<dd>
162
163<p>This is item two.</p>
164
165</dd>
166<dt id="item-three">item three  </dt>
167<dd>
168
169<p>This is item three.</p>
170
171</dd>
172</dl>
173
174
175</body>
176
177</html>
178
179
180