This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix ext/Pod-Html/t/*.t that assumed '.' in @INC
[perl5.git] / ext / Pod-Html / t / htmldir4.t
CommitLineData
fbf24e08
MG
1#!/usr/bin/perl -w # -*- perl -*-
2
3BEGIN {
ea329caf 4 require "./t/pod2html-lib.pl";
fbf24e08
MG
5}
6
7use strict;
fbf24e08 8use Cwd;
8d43ec19
MG
9use File::Spec::Functions ':ALL';
10use Test::More tests => 2;
fbf24e08 11
7c41f1ea 12my $cwd = cwd();
1d7ed44a 13my $data_pos = tell DATA; # to read <DATA> twice
fbf24e08 14
1d7ed44a 15convert_n_test("htmldir4", "test --htmldir and --htmlroot 4a",
fbf24e08
MG
16 "--podpath=t",
17 "--htmldir=t",
8d43ec19 18 "--outfile=". catfile('t', 'htmldir4.html'),
cfb2be1c 19 "--quiet",
fbf24e08
MG
20);
21
1d7ed44a
MG
22seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same)
23
24convert_n_test("htmldir4", "test --htmldir and --htmlroot 4b",
25 "--podpath=t",
26 "--podroot=$cwd",
8d43ec19 27 "--htmldir=". catdir($cwd, 't'),
1d7ed44a 28 "--norecurse",
cfb2be1c 29 "--quiet",
1d7ed44a
MG
30);
31
fbf24e08
MG
32__DATA__
33<?xml version="1.0" ?>
34<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
35<html xmlns="http://www.w3.org/1999/xhtml">
36<head>
df8cd0db 37<title></title>
fbf24e08
MG
38<meta http-equiv="content-type" content="text/html; charset=utf-8" />
39<link rev="made" href="mailto:[PERLADMIN]" />
40</head>
41
e6afd145 42<body>
fbf24e08
MG
43
44
fbf24e08 45
df8cd0db
MG
46<ul id="index">
47 <li><a href="#NAME">NAME</a></li>
48 <li><a href="#LINKS">LINKS</a></li>
fbf24e08
MG
49</ul>
50
df8cd0db 51<h1 id="NAME">NAME</h1>
fbf24e08 52
fbf24e08 53<p>htmldir - Test --htmldir feature</p>
df8cd0db
MG
54
55<h1 id="LINKS">LINKS</h1>
56
57<p>Normal text, a <a>link</a> to nowhere,</p>
58
9ace98e2 59<p>a link to <a>perlvar-copy</a>,</p>
df8cd0db
MG
60
61<p><a href="t/htmlescp.html">htmlescp</a>,</p>
62
8d43ec19 63<p><a href="t/feature.html#Another-Head-1">&quot;Another Head 1&quot; in feature</a>,</p>
df8cd0db 64
8d43ec19 65<p>and another <a href="t/feature.html#Another-Head-1">&quot;Another Head 1&quot; in feature</a>.</p>
df8cd0db 66
fbf24e08
MG
67
68</body>
69
70</html>
df8cd0db
MG
71
72