| 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::Functions; |
| 14 | use Test::More tests => 1; |
| 15 | |
| 16 | SKIP: { |
| 17 | my $output = make_test_dir(); |
| 18 | skip "$output", 1 if $output; |
| 19 | |
| 20 | my ($v, $d) = splitpath(cwd(), 1); |
| 21 | my @dirs = splitdir($d); |
| 22 | shift @dirs if $dirs[0] eq ''; |
| 23 | my $relcwd = join '/', @dirs; |
| 24 | |
| 25 | convert_n_test("crossref", "cross references", |
| 26 | "--podpath=". File::Spec::Unix->catdir($relcwd, 't') . ":" |
| 27 | . File::Spec::Unix->catdir($relcwd, 'testdir/test.lib'), |
| 28 | "--podroot=". catpath($v, '/', ''), |
| 29 | "--quiet", |
| 30 | ); |
| 31 | } |
| 32 | |
| 33 | __DATA__ |
| 34 | <?xml version="1.0" ?> |
| 35 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 36 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 37 | <head> |
| 38 | <title></title> |
| 39 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
| 40 | <link rev="made" href="mailto:[PERLADMIN]" /> |
| 41 | </head> |
| 42 | |
| 43 | <body style="background-color: white"> |
| 44 | |
| 45 | |
| 46 | |
| 47 | <ul id="index"> |
| 48 | <li><a href="#NAME">NAME</a></li> |
| 49 | <li><a href="#LINKS">LINKS</a></li> |
| 50 | <li><a href="#TARGETS">TARGETS</a> |
| 51 | <ul> |
| 52 | <li><a href="#section1">section1</a></li> |
| 53 | </ul> |
| 54 | </li> |
| 55 | </ul> |
| 56 | |
| 57 | <h1 id="NAME">NAME</h1> |
| 58 | |
| 59 | <p>htmlcrossref - Test HTML cross reference links</p> |
| 60 | |
| 61 | <h1 id="LINKS">LINKS</h1> |
| 62 | |
| 63 | <p><a href="#section1">"section1"</a></p> |
| 64 | |
| 65 | <p><a href="/[RELCURRENTWORKINGDIRECTORY]/t/htmllink.html#section-2">"section 2" in htmllink</a></p> |
| 66 | |
| 67 | <p><a href="#item1">"item1"</a></p> |
| 68 | |
| 69 | <p><a href="#non-existant-section">"non existant section"</a></p> |
| 70 | |
| 71 | <p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html">var-copy</a></p> |
| 72 | |
| 73 | <p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html#pod">"$"" in var-copy</a></p> |
| 74 | |
| 75 | <p><code>var-copy</code></p> |
| 76 | |
| 77 | <p><code>var-copy/$"</code></p> |
| 78 | |
| 79 | <p><a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/podspec-copy.html#First">"First:" in podspec-copy</a></p> |
| 80 | |
| 81 | <p><code>podspec-copy/First:</code></p> |
| 82 | |
| 83 | <p><a>notperldoc</a></p> |
| 84 | |
| 85 | <h1 id="TARGETS">TARGETS</h1> |
| 86 | |
| 87 | <h2 id="section1">section1</h2> |
| 88 | |
| 89 | <p>This is section one.</p> |
| 90 | |
| 91 | <dl> |
| 92 | |
| 93 | <dt id="item1">item1 </dt> |
| 94 | <dd> |
| 95 | |
| 96 | <p>This is item one.</p> |
| 97 | |
| 98 | </dd> |
| 99 | </dl> |
| 100 | |
| 101 | |
| 102 | </body> |
| 103 | |
| 104 | </html> |
| 105 | |
| 106 | |