htmldir1.t revision 1.1.1.1
1#!/usr/bin/perl -w # -*- perl -*- 2 3BEGIN { 4 require "t/pod2html-lib.pl"; 5} 6 7END { 8 rem_test_dir(); 9} 10 11use strict; 12use Cwd; 13use File::Spec; 14use File::Spec::Functions; 15use Test::More tests => 2; 16 17# XXX Separate tests that rely on test.lib from the others so they are the only 18# ones skipped (instead of all of them). This applies to htmldir{1,3,5}.t, and 19# crossref.t (as of 10/29/11). 20SKIP: { 21 my $output = make_test_dir(); 22 skip "$output", 2 if $output; 23 24 my ($v, $d) = splitpath(cwd(), 1); 25 my $relcwd = substr($d, length(File::Spec->rootdir())); 26 27 my $data_pos = tell DATA; # to read <DATA> twice 28 29 30 convert_n_test("htmldir1", "test --htmldir and --htmlroot 1a", 31 "--podpath=". catdir($relcwd, 't') . ":" . catfile($relcwd, 'testdir/test.lib'), 32 "--podroot=$v". File::Spec->rootdir, 33 "--htmldir=t", 34 "--quiet", 35 ); 36 37 seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same) 38 39 convert_n_test("htmldir1", "test --htmldir and --htmlroot 1b", 40 "--podpath=$relcwd", 41 "--podroot=$v". File::Spec->rootdir, 42 "--htmldir=". catdir($relcwd, 't'), 43 "--htmlroot=/", 44 "--quiet", 45 ); 46} 47 48__DATA__ 49<?xml version="1.0" ?> 50<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 51<html xmlns="http://www.w3.org/1999/xhtml"> 52<head> 53<title></title> 54<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 55<link rev="made" href="mailto:[PERLADMIN]" /> 56</head> 57 58<body style="background-color: white"> 59 60 61 62<ul id="index"> 63 <li><a href="#NAME">NAME</a></li> 64 <li><a href="#LINKS">LINKS</a></li> 65</ul> 66 67<h1 id="NAME">NAME</h1> 68 69<p>htmldir - Test --htmldir feature</p> 70 71<h1 id="LINKS">LINKS</h1> 72 73<pre><code> Verbatim B<means> verbatim.</code></pre> 74 75<p>Normal text, a <a>link</a> to nowhere,</p> 76 77<p>a link to <a href="/[RELCURRENTWORKINGDIRECTORY]/testdir/test.lib/var-copy.html">var-copy</a>,</p> 78 79<p><a href="/[RELCURRENTWORKINGDIRECTORY]/t/htmlescp.html">htmlescp</a>,</p> 80 81<p><a href="/[RELCURRENTWORKINGDIRECTORY]/t/feature.html#Another-Head-1">"Another Head 1" in feature</a>,</p> 82 83<p>and another <a href="/[RELCURRENTWORKINGDIRECTORY]/t/feature.html#Another-Head-1">"Another Head 1" in feature</a>.</p> 84 85 86</body> 87 88</html> 89 90 91