htmldir2.t revision 1.1.1.3
1#!/usr/bin/perl -w # -*- perl -*- 2 3BEGIN { 4 require "./t/pod2html-lib.pl"; 5} 6 7use strict; 8use Cwd; 9use Test::More tests => 3; 10 11my $cwd = cwd(); 12my $data_pos = tell DATA; # to read <DATA> twice 13 14convert_n_test("htmldir2", "test --htmldir and --htmlroot 2a", 15 "--podpath=t", 16 "--htmldir=t", 17 "--quiet", 18); 19 20seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same) 21 22convert_n_test("htmldir2", "test --htmldir and --htmlroot 2b", 23 "--podpath=t", 24 "--quiet", 25); 26 27seek DATA, $data_pos, 0; # to read <DATA> thrice (expected output is the same) 28 29# this test makes sure paths are absolute unless --htmldir is specified 30convert_n_test("htmldir2", "test --htmldir and --htmlroot 2c", 31 "--podpath=t", 32 "--podroot=$cwd", 33 "--norecurse", # testing --norecurse, too 34 "--quiet", 35); 36 37__DATA__ 38<?xml version="1.0" ?> 39<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 40<html xmlns="http://www.w3.org/1999/xhtml"> 41<head> 42<title>htmldir - Test --htmldir feature</title> 43<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 44<link rev="made" href="mailto:[PERLADMIN]" /> 45</head> 46 47<body> 48 49 50 51<ul id="index"> 52 <li><a href="#NAME">NAME</a></li> 53 <li><a href="#LINKS">LINKS</a></li> 54</ul> 55 56<h1 id="NAME">NAME</h1> 57 58<p>htmldir - Test --htmldir feature</p> 59 60<h1 id="LINKS">LINKS</h1> 61 62<p>Normal text, a <a>link</a> to nowhere,</p> 63 64<p>a link to <a>perlvar-copy</a>,</p> 65 66<p><a href="/t/htmlescp.html">htmlescp</a>,</p> 67 68<p><a href="/t/feature.html#Another-Head-1">"Another Head 1" in feature</a>,</p> 69 70<p>and another <a href="/t/feature.html#Another-Head-1">"Another Head 1" in feature</a>.</p> 71 72 73</body> 74 75</html> 76 77 78