1#!/usr/bin/perl -w # -*- perl -*- 2 3BEGIN { 4 require "./t/pod2html-lib.pl"; 5} 6 7use strict; 8use Cwd; 9use File::Spec::Functions ':ALL'; 10use Test::More tests => 2; 11 12my $cwd = cwd(); 13my $data_pos = tell DATA; # to read <DATA> twice 14 15convert_n_test("htmldir4", "test --htmldir and --htmlroot 4a", 16 "--podpath=t", 17 "--htmldir=t", 18 "--outfile=". catfile('t', 'htmldir4.html'), 19 "--quiet", 20); 21 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", 27 "--htmldir=". catdir($cwd, 't'), 28 "--norecurse", 29 "--quiet", 30); 31 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> 37<title>htmldir - Test --htmldir feature</title> 38<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 39<link rev="made" href="mailto:[PERLADMIN]" /> 40</head> 41 42<body> 43 44 45 46<ul id="index"> 47 <li><a href="#NAME">NAME</a></li> 48 <li><a href="#LINKS">LINKS</a></li> 49</ul> 50 51<h1 id="NAME">NAME</h1> 52 53<p>htmldir - Test --htmldir feature</p> 54 55<h1 id="LINKS">LINKS</h1> 56 57<p>Normal text, a <a>link</a> to nowhere,</p> 58 59<p>a link to <a>perlvar-copy</a>,</p> 60 61<p><a href="t/htmlescp.html">htmlescp</a>,</p> 62 63<p><a href="t/feature.html#Another-Head-1">"Another Head 1" in feature</a>,</p> 64 65<p>and another <a href="t/feature.html#Another-Head-1">"Another Head 1" in feature</a>.</p> 66 67 68</body> 69 70</html> 71 72 73