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; 10 11use Testing qw( setup_testing_dir xconvert ); 12use Cwd; 13 14my $debug = 0; 15my $startdir = cwd(); 16END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } 17my ($expect_raw, $args); 18{ local $/; $expect_raw = <DATA>; } 19 20my $tdir = setup_testing_dir( { 21 debug => $debug, 22} ); 23 24$args = { 25 podstub => "poderr", 26 description => "pod error section", 27 expect => $expect_raw, 28 debug => 1, 29}; 30 31xconvert($args); 32 33done_testing; 34 35__DATA__ 36<?xml version="1.0" ?> 37<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 38<html xmlns="http://www.w3.org/1999/xhtml"> 39<head> 40<title></title> 41<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 42<link rev="made" href="mailto:[PERLADMIN]" /> 43</head> 44 45<body> 46 47 48 49<ul id="index"> 50 <li><a href="#NAME">NAME</a></li> 51 <li><a href="#POD-ERRORS">POD ERRORS</a></li> 52</ul> 53 54<h1 id="NAME">NAME</h1> 55 56<p>Test POD ERROR section</p> 57 58<ul> 59 60<p>This text is not allowed</p> 61 62<p>*</p> 63 64<p>The wiz item.</p> 65 66<p>*</p> 67 68<p>The waz item.</p> 69 70</ul> 71 72<h1 id="POD-ERRORS">POD ERRORS</h1> 73 74<p>Hey! <b>The above document had some coding errors, which are explained below:</b></p> 75 76<dl> 77 78<dt id="Around-line-5">Around line 5:</dt> 79<dd> 80 81<p>You can't have =items (as at line 9) unless the first thing after the =over is an =item</p> 82 83</dd> 84</dl> 85 86 87</body> 88 89</html> 90 91 92