1BEGIN { 2 use File::Spec::Functions ':ALL'; 3 @INC = map { rel2abs($_) } 4 (qw| ./lib ./t/lib ../../lib |); 5} 6 7use strict; 8use warnings; 9use Test::More; 10use Testing qw( setup_testing_dir xconvert ); 11use Cwd; 12 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>; } 18 19my $tdir = setup_testing_dir( { 20 debug => $debug, 21} ); 22 23my $cwd = cwd(); 24 25$args = { 26 podstub => "feature", 27 description => "misc pod-html features", 28 expect => $expect_raw, 29 p2h => { 30 backlink => 1, 31 css => 'style.css', 32 header => 1, # no styling b/c of --ccs 33 htmldir => catdir($cwd, 't'), 34 noindex => 1, 35 podpath => 't', 36 podroot => $cwd, 37 title => 'a title', 38 quiet => 1, 39 }, 40 debug => $debug, 41}; 42xconvert($args); 43 44done_testing; 45 46__DATA__ 47<?xml version="1.0" ?> 48<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 49<html xmlns="http://www.w3.org/1999/xhtml"> 50<head> 51<title>a title</title> 52<link rel="stylesheet" href="style.css" type="text/css" /> 53<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 54<link rev="made" href="mailto:[PERLADMIN]" /> 55</head> 56 57<body id="_podtop_"> 58<table border="0" width="100%" cellspacing="0" cellpadding="3"> 59<tr><td class="_podblock_" valign="middle"> 60<big><strong><span class="_podblock_"> a title</span></strong></big> 61</td></tr> 62</table> 63 64 65 66<a href="#_podtop_"><h1 id="Head-1">Head 1</h1></a> 67 68<p>A paragraph</p> 69 70 71 72some html 73 74<p>Another paragraph</p> 75 76<a href="#_podtop_"><h1 id="Another-Head-1">Another Head 1</h1></a> 77 78<p>some text and a link <a href="t/crossref.html">crossref</a></p> 79 80<table border="0" width="100%" cellspacing="0" cellpadding="3"> 81<tr><td class="_podblock_" valign="middle"> 82<big><strong><span class="_podblock_"> a title</span></strong></big> 83</td></tr> 84</table> 85 86</body> 87 88</html> 89 90 91