File: htmllink.t

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (179 lines) | stat: -rw-r--r-- 3,507 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
BEGIN {
    use File::Spec::Functions ':ALL';
    @INC = map { rel2abs($_) }
             (qw| ./lib ./t/lib ../../lib |);
}

use strict;
use warnings;
use Test::More;
use Testing qw( setup_testing_dir xconvert );
use Cwd;

my $debug = 0;
my $startdir = cwd();
END { chdir($startdir) or die("Cannot change back to $startdir: $!"); }
my ($expect_raw, $args);
{ local $/; $expect_raw = <DATA>; }

my $tdir = setup_testing_dir( {
    debug       => $debug,
} );

$args = {
    podstub => "htmllink",
    description => "html links",
    expect => $expect_raw,
    debug => 1,
};

xconvert($args);

done_testing;

__DATA__
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>htmllink - Test HTML links</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:[PERLADMIN]" />
</head>

<body>



<ul id="index">
  <li><a href="#NAME">NAME</a></li>
  <li><a href="#LINKS">LINKS</a></li>
  <li><a href="#TARGETS">TARGETS</a>
    <ul>
      <li><a href="#section1">section1</a></li>
      <li><a href="#section-2">section 2</a></li>
      <li><a href="#section-three">section three</a></li>
    </ul>
  </li>
</ul>

<h1 id="NAME">NAME</h1>

<p>htmllink - Test HTML links</p>

<h1 id="LINKS">LINKS</h1>

<p><a href="#section1">&quot;section1&quot;</a></p>

<p><a href="#section-2">&quot;section 2&quot;</a></p>

<p><a href="#section-three">&quot;section three&quot;</a></p>

<p><a href="#item1">&quot;item1&quot;</a></p>

<p><a href="#item-2">&quot;item 2&quot;</a></p>

<p><a href="#item-three">&quot;item three&quot;</a></p>

<p><a href="#section1">&quot;section1&quot;</a></p>

<p><a href="#section-2">&quot;section 2&quot;</a></p>

<p><a href="#section-three">&quot;section three&quot;</a></p>

<p><a href="#item1">&quot;item1&quot;</a></p>

<p><a href="#item-2">&quot;item 2&quot;</a></p>

<p><a href="#item-three">&quot;item three&quot;</a></p>

<p><a href="#section1">&quot;section1&quot;</a></p>

<p><a href="#section-2">&quot;section 2&quot;</a></p>

<p><a href="#section-three">&quot;section three&quot;</a></p>

<p><a href="#item1">&quot;item1&quot;</a></p>

<p><a href="#item-2">&quot;item 2&quot;</a></p>

<p><a href="#item-three">&quot;item three&quot;</a></p>

<p><a href="#section1">text</a></p>

<p><a href="#section-2">text</a></p>

<p><a href="#section-three">text</a></p>

<p><a href="#item1">text</a></p>

<p><a href="#item-2">text</a></p>

<p><a href="#item-three">text</a></p>

<p><a href="#section1">text</a></p>

<p><a href="#section-2">text</a></p>

<p><a href="#section-three">text</a></p>

<p><a href="#item1">text</a></p>

<p><a href="#item-2">text</a></p>

<p><a href="#item-three">text</a></p>

<p><a href="#section1">text</a></p>

<p><a href="#section-2">text</a></p>

<p><a href="#section-three">text</a></p>

<p><a href="#item1">text</a></p>

<p><a href="#item-2">text</a></p>

<p><a href="#item-three">text</a></p>

<h1 id="TARGETS">TARGETS</h1>

<h2 id="section1">section1</h2>

<p>This is section one.</p>

<h2 id="section-2">section 2</h2>

<p>This is section two.</p>

<h2 id="section-three">section three</h2>

<p>This is section three.</p>

<dl>

<dt id="item1">item1  </dt>
<dd>

<p>This is item one.</p>

</dd>
<dt id="item-2">item 2  </dt>
<dd>

<p>This is item two.</p>

</dd>
<dt id="item-three">item three  </dt>
<dd>

<p>This is item three.</p>

</dd>
</dl>


</body>

</html>