The ext/Pod-Html tests generate warnings that appear in the output.
This patch adds --quiet to the function call to silence the
warnings, without (I hope) changing the point of the tests.
"--podpath=t",
"--podroot=$cwd",
"--title=a title",
+ "--quiet",
);
use strict;
use Cwd;
-use Test::More tests => 1;
+use Test::More tests => 2;
my $cwd = cwd();
+my $warn;
+$SIG{__WARN__} = sub { $warn .= $_[0] };
+
convert_n_test("feature2", "misc pod-html features 2",
"--backlink",
"--header",
"--podroot=$cwd",
"--norecurse",
"--verbose",
+ "--quiet",
);
+like($warn,
+ qr(
+ \Acaching\ directories\ for\ later\ use\n
+ Converting\ input\ file\ \S+/feature2\.pod\n\z
+ )x,
+ "misc pod-html --verbose warnings");
+
__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">
"--podpath=". catdir($relcwd, 't') . ":" . catfile($relcwd, 'testdir/test.lib'),
"--podroot=$v". File::Spec->rootdir,
"--htmldir=t",
+ "--quiet",
);
seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same)
convert_n_test("htmldir1", "test --htmldir and --htmlroot 1b",
"--podpath=$relcwd",
"--podroot=$v". File::Spec->rootdir,
- "--htmldir=". catfile $relcwd, 't',
+ "--htmldir=". catdir($relcwd, 't'),
"--htmlroot=/",
+ "--quiet",
);
}
convert_n_test("htmldir2", "test --htmldir and --htmlroot 2a",
"--podpath=t",
"--htmldir=t",
+ "--quiet",
);
seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same)
convert_n_test("htmldir2", "test --htmldir and --htmlroot 2b",
"--podpath=t",
+ "--quiet",
);
seek DATA, $data_pos, 0; # to read <DATA> thrice (expected output is the same)
"--podpath=t",
"--podroot=$cwd",
"--norecurse", # testing --norecurse, too
+ "--quiet",
);
__DATA__
"--podpath=$relcwd",
"--podroot=$v". File::Spec->rootdir,
"--htmldir=". catdir($cwd, 't', ''), # test removal trailing slash,
+ "--quiet",
);
seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same)
"--podroot=$v". File::Spec->rootdir,
"--htmldir=t",
"--outfile=t/htmldir3.html",
+ "--quiet",
);
}
"--podpath=t",
"--htmldir=t",
"--outfile=". catfile('t', 'htmldir4.html'),
+ "--quiet",
);
seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same)
"--podroot=$cwd",
"--htmldir=". catdir($cwd, 't'),
"--norecurse",
+ "--quiet",
);
__DATA__
"--podroot=$cwd",
"--htmldir=$cwd",
"--htmlroot=/",
+ "--quiet",
);
}
use strict;
use Test::More tests => 1;
-convert_n_test("htmlview", "html rendering");
+convert_n_test("htmlview", "html rendering", "--quiet");
__DATA__
<?xml version="1.0" ?>