This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Start modifying test cases to suit new Pod::Html
[perl5.git] / ext / Pod-Html / t / htmlcrossref.t
CommitLineData
fbf24e08
MG
1#!/usr/bin/perl -w # -*- perl -*-
2
3BEGIN {
4 require "t/pod2html-lib.pl";
5}
6
7use strict;
8use Test::More tests => 1;
9
10use File::Spec;
11use Cwd;
12
13# XXX Is there a better way to do this? I need a relative url to cwd because of
14# --podpath and --podroot
15# Remove root dir from path
16my $cwd = substr(Cwd::cwd(), length(File::Spec->rootdir()));
17
18convert_n_test("htmlcrossref", "html cross references",
19 "--podpath=$cwd/t:usr/share/perl",
20 "--podroot=/",
21);
22
23__DATA__
24<?xml version="1.0" ?>
25<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
26<html xmlns="http://www.w3.org/1999/xhtml">
27<head>
28<title></title>
29<meta http-equiv="content-type" content="text/html; charset=utf-8" />
30<link rev="made" href="mailto:[PERLADMIN]" />
31</head>
32
33<body style="background-color: white">
34
35
36
37<ul id="index">
38 <li><a href="#NAME">NAME</a></li>
39 <li><a href="#LINKS">LINKS</a></li>
40 <li><a href="#TARGETS">TARGETS</a>
41 <ul>
42 <li><a href="#section1">section1</a></li>
43 </ul>
44 </li>
45</ul>
46
47<h1 id="NAME">NAME</h1>
48
49<p>htmlcrossref - Test HTML cross reference links</p>
50<h1><a name="links">LINKS</a></h1>
51<p><a href="#section1">section1</a></p>
52<p><a href="[CURRENTWORKINGDIRECTORY]/t/htmllink.html#section_2">section 2 in the htmllink manpage</a></p>
53<p><a href="#item1">item1</a></p>
54<p><a href="#non_existant_section">non existant section</a></p>
55<p><a href="/usr/share/perl/5.10.1/pod/perlvar.html">the perlvar manpage</a></p>
56<p><a href="/usr/share/perl/5.10.1/pod/perlvar.html#_">$&quot; in the perlvar manpage</a></p>
57<p><code>perlvar</code></p>
58<p><code>perlvar/$&quot;</code></p>
59<p><a href="/usr/share/perl/5.10.1/pod/perlpodspec.html#first_">First: in the perlpodspec manpage</a></p>
60<p><code>perlpodspec/First:</code></p>
61<p><em>notperldoc</em></p>
62<p>
63</p>
64<hr />
65<h1><a name="targets">TARGETS</a></h1>
66<p>
67</p>
68<h2><a name="section1">section1</a></h2>
69<p>This is section one.</p>
70<dl>
71<dt><strong><a name="item1" class="item">item1</a></strong></dt>
72
73<dd>
74<p>This is item one.</p>
75</dd>
76</dl>
77
78</body>
79
80</html>