This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta
[perl5.git] / ext / Pod-Html / t / htmldir4.t
CommitLineData
fbf24e08 1BEGIN {
8433f829
JK
2 use File::Spec::Functions ':ALL';
3 @INC = map { rel2abs($_) }
4 (qw| ./lib ./t/lib ../../lib |);
fbf24e08
MG
5}
6
7use strict;
8433f829 8use warnings;
ab296d81 9use Test::More;
8433f829
JK
10use Testing qw( setup_testing_dir xconvert );
11use Cwd;
fbf24e08 12
8433f829
JK
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>; }
fbf24e08 18
8433f829
JK
19my $tdir = setup_testing_dir( {
20 debug => $debug,
404bfc71 21} );
fbf24e08 22
8433f829 23my $cwd = cwd();
1d7ed44a 24
8433f829
JK
25$args = {
26 podstub => "htmldir4",
27 description => "test --htmldir and --htmlroot 4a",
28 expect => $expect_raw,
29 p2h => {
30 podpath => 't',
31 htmldir => 't',
32 outfile => catfile('t', 'htmldir4.html'),
33 quiet => 1,
34 },
35 debug => $debug,
36};
37xconvert($args);
38
39$args = {
40 podstub => "htmldir4",
41 description => "test --htmldir and --htmlroot 4b",
42 expect => $expect_raw,
43 p2h => {
44 podpath => 't',
45 podroot => $cwd,
46 htmldir => catdir($cwd, 't'),
47 norecurse => 1,
48 quiet => 1,
49 },
50 debug => $debug,
51};
52xconvert($args);
1d7ed44a 53
ab296d81
MB
54done_testing;
55
fbf24e08
MG
56__DATA__
57<?xml version="1.0" ?>
58<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
59<html xmlns="http://www.w3.org/1999/xhtml">
60<head>
38e30ca7 61<title>htmldir - Test --htmldir feature</title>
fbf24e08
MG
62<meta http-equiv="content-type" content="text/html; charset=utf-8" />
63<link rev="made" href="mailto:[PERLADMIN]" />
64</head>
65
e6afd145 66<body>
fbf24e08
MG
67
68
fbf24e08 69
df8cd0db
MG
70<ul id="index">
71 <li><a href="#NAME">NAME</a></li>
72 <li><a href="#LINKS">LINKS</a></li>
fbf24e08
MG
73</ul>
74
df8cd0db 75<h1 id="NAME">NAME</h1>
fbf24e08 76
fbf24e08 77<p>htmldir - Test --htmldir feature</p>
df8cd0db
MG
78
79<h1 id="LINKS">LINKS</h1>
80
81<p>Normal text, a <a>link</a> to nowhere,</p>
82
9ace98e2 83<p>a link to <a>perlvar-copy</a>,</p>
df8cd0db
MG
84
85<p><a href="t/htmlescp.html">htmlescp</a>,</p>
86
8d43ec19 87<p><a href="t/feature.html#Another-Head-1">&quot;Another Head 1&quot; in feature</a>,</p>
df8cd0db 88
8d43ec19 89<p>and another <a href="t/feature.html#Another-Head-1">&quot;Another Head 1&quot; in feature</a>.</p>
df8cd0db 90
fbf24e08
MG
91
92</body>
93
94</html>
df8cd0db
MG
95
96