summaryrefslogtreecommitdiff
path: root/ext/Pod-Html/t/feature.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Pod-Html/t/feature.t')
-rw-r--r--ext/Pod-Html/t/feature.t50
1 files changed, 35 insertions, 15 deletions
diff --git a/ext/Pod-Html/t/feature.t b/ext/Pod-Html/t/feature.t
index 134768b202..f44cadea14 100644
--- a/ext/Pod-Html/t/feature.t
+++ b/ext/Pod-Html/t/feature.t
@@ -1,28 +1,48 @@
-#!/usr/bin/perl -w # -*- perl -*-
+# -*- perl -*-
BEGIN {
- require "./t/pod2html-lib.pl";
+ use File::Spec::Functions ':ALL';
+ @INC = map { rel2abs($_) }
+ (qw| ./lib ./t/lib ../../lib |);
}
use strict;
-use Cwd;
-use File::Spec::Functions;
+use warnings;
use Test::More tests => 1;
+use Testing qw( setup_testing_dir xconvert );
+use Cwd;
-my $cwd = cwd();
+my $debug = 0;
+my $startdir = cwd();
+END { chdir($startdir) or die("Cannot change back to $startdir: $!"); }
+my ($expect_raw, $args);
+{ local $/; $expect_raw = <DATA>; }
-convert_n_test("feature", "misc pod-html features", {
- backlink => 1,
- css => 'style.css',
- header => 1, # no styling b/c of --ccs
- htmldir => catdir($cwd, 't'),
- noindex => 1,
- podpath => 't',
- podroot => $cwd,
- title => 'a title',
- quiet => 1,
+my $tdir = setup_testing_dir( {
+ debug => $debug,
} );
+my $cwd = cwd();
+
+$args = {
+ podstub => "feature",
+ description => "misc pod-html features",
+ expect => $expect_raw,
+ p2h => {
+ backlink => 1,
+ css => 'style.css',
+ header => 1, # no styling b/c of --ccs
+ htmldir => catdir($cwd, 't'),
+ noindex => 1,
+ podpath => 't',
+ podroot => $cwd,
+ title => 'a title',
+ quiet => 1,
+ },
+ debug => $debug,
+};
+xconvert($args);
+
__DATA__
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">