This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix bug in pod2html crossreferencing
[perl5.git] / ext / Pod-Html / t / crossref2.t
1 #!/usr/bin/perl -w                                         # -*- perl -*-
2
3 BEGIN {
4     require "t/pod2html-lib.pl";
5 }
6
7 END {
8     rem_test_dir();
9 }
10
11 use strict;
12 use Cwd;
13 use File::Spec;
14 use File::Spec::Functions;
15 use Test::More tests => 1;
16
17 SKIP: {
18     my $output = make_test_dir();
19     skip "$output", 1 if $output;
20     
21     my $cwd = cwd();
22
23     convert_n_test("crossref", "cross references", 
24      "--podpath=t:testdir/test.lib",
25      "--podroot=$cwd",
26      "--htmldir=$cwd",
27      "--quiet",
28     );
29 }
30
31 __DATA__
32 <?xml version="1.0" ?>
33 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
34 <html xmlns="http://www.w3.org/1999/xhtml">
35 <head>
36 <title></title>
37 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
38 <link rev="made" href="mailto:[PERLADMIN]" />
39 </head>
40
41 <body style="background-color: white">
42
43
44
45 <ul id="index">
46   <li><a href="#NAME">NAME</a></li>
47   <li><a href="#LINKS">LINKS</a></li>
48   <li><a href="#TARGETS">TARGETS</a>
49     <ul>
50       <li><a href="#section1">section1</a></li>
51     </ul>
52   </li>
53 </ul>
54
55 <h1 id="NAME">NAME</h1>
56
57 <p>htmlcrossref - Test HTML cross reference links</p>
58
59 <h1 id="LINKS">LINKS</h1>
60
61 <p><a href="#section1">&quot;section1&quot;</a></p>
62
63 <p><a href="./htmllink.html#section-2">&quot;section 2&quot; in htmllink</a></p>
64
65 <p><a href="#item1">&quot;item1&quot;</a></p>
66
67 <p><a href="#non-existant-section">&quot;non existant section&quot;</a></p>
68
69 <p><a href="../testdir/test.lib/var-copy.html">var-copy</a></p>
70
71 <p><a href="../testdir/test.lib/var-copy.html#pod-">&quot;$&quot;&quot; in var-copy</a></p>
72
73 <p><code>var-copy</code></p>
74
75 <p><code>var-copy/$&quot;</code></p>
76
77 <p><a href="../testdir/test.lib/podspec-copy.html#First:">&quot;First:&quot; in podspec-copy</a></p>
78
79 <p><code>podspec-copy/First:</code></p>
80
81 <p><a>notperldoc</a></p>
82
83 <h1 id="TARGETS">TARGETS</h1>
84
85 <h2 id="section1">section1</h2>
86
87 <p>This is section one.</p>
88
89 <dl>
90
91 <dt id="item1">item1  </dt>
92 <dd>
93
94 <p>This is item one.</p>
95
96 </dd>
97 </dl>
98
99
100 </body>
101
102 </html>
103
104