diff options
author | Robin Barker <rmbarker@cpan.org> | 2012-02-07 20:13:41 +0000 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-02-12 14:41:23 -0800 |
commit | cfb2be1c2b8a5154087a5076944bfe3218862b02 (patch) | |
tree | 2236d38a1b291c47c7dfb0cc27956517ab151007 | |
parent | 57121c06712381a54c6c8c77dfc1b8d812dbdf98 (diff) | |
download | perl-cfb2be1c2b8a5154087a5076944bfe3218862b02.tar.gz |
add --quiet to silence noisy tests
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.
-rw-r--r-- | ext/Pod-Html/t/feature.t | 1 | ||||
-rw-r--r-- | ext/Pod-Html/t/feature2.t | 13 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir1.t | 4 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir2.t | 3 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir3.t | 2 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir4.t | 2 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir5.t | 1 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmlview.t | 2 |
8 files changed, 25 insertions, 3 deletions
diff --git a/ext/Pod-Html/t/feature.t b/ext/Pod-Html/t/feature.t index 5f27454327..79cd1647cb 100644 --- a/ext/Pod-Html/t/feature.t +++ b/ext/Pod-Html/t/feature.t @@ -20,6 +20,7 @@ convert_n_test("feature", "misc pod-html features", "--podpath=t", "--podroot=$cwd", "--title=a title", + "--quiet", ); diff --git a/ext/Pod-Html/t/feature2.t b/ext/Pod-Html/t/feature2.t index feeb84f910..105d420cb5 100644 --- a/ext/Pod-Html/t/feature2.t +++ b/ext/Pod-Html/t/feature2.t @@ -7,10 +7,13 @@ BEGIN { 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", @@ -18,8 +21,16 @@ convert_n_test("feature2", "misc pod-html features 2", "--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"> diff --git a/ext/Pod-Html/t/htmldir1.t b/ext/Pod-Html/t/htmldir1.t index a0e747ffe5..a8c367ac4a 100644 --- a/ext/Pod-Html/t/htmldir1.t +++ b/ext/Pod-Html/t/htmldir1.t @@ -31,6 +31,7 @@ SKIP: { "--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) @@ -38,8 +39,9 @@ SKIP: { 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", ); } diff --git a/ext/Pod-Html/t/htmldir2.t b/ext/Pod-Html/t/htmldir2.t index b5f5b48105..d1add488e7 100644 --- a/ext/Pod-Html/t/htmldir2.t +++ b/ext/Pod-Html/t/htmldir2.t @@ -14,12 +14,14 @@ my $data_pos = tell DATA; # to read <DATA> twice 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) @@ -29,6 +31,7 @@ convert_n_test("htmldir2", "test --htmldir and --htmlroot 2c", "--podpath=t", "--podroot=$cwd", "--norecurse", # testing --norecurse, too + "--quiet", ); __DATA__ diff --git a/ext/Pod-Html/t/htmldir3.t b/ext/Pod-Html/t/htmldir3.t index 805c9d9d41..555dc74862 100644 --- a/ext/Pod-Html/t/htmldir3.t +++ b/ext/Pod-Html/t/htmldir3.t @@ -28,6 +28,7 @@ SKIP: { "--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) @@ -37,6 +38,7 @@ SKIP: { "--podroot=$v". File::Spec->rootdir, "--htmldir=t", "--outfile=t/htmldir3.html", + "--quiet", ); } diff --git a/ext/Pod-Html/t/htmldir4.t b/ext/Pod-Html/t/htmldir4.t index 034fffe65f..1ebcecda12 100644 --- a/ext/Pod-Html/t/htmldir4.t +++ b/ext/Pod-Html/t/htmldir4.t @@ -16,6 +16,7 @@ convert_n_test("htmldir4", "test --htmldir and --htmlroot 4a", "--podpath=t", "--htmldir=t", "--outfile=". catfile('t', 'htmldir4.html'), + "--quiet", ); seek DATA, $data_pos, 0; # to read <DATA> twice (expected output is the same) @@ -25,6 +26,7 @@ convert_n_test("htmldir4", "test --htmldir and --htmlroot 4b", "--podroot=$cwd", "--htmldir=". catdir($cwd, 't'), "--norecurse", + "--quiet", ); __DATA__ diff --git a/ext/Pod-Html/t/htmldir5.t b/ext/Pod-Html/t/htmldir5.t index 15a3901036..d9b6a6bfe3 100644 --- a/ext/Pod-Html/t/htmldir5.t +++ b/ext/Pod-Html/t/htmldir5.t @@ -28,6 +28,7 @@ SKIP: { "--podroot=$cwd", "--htmldir=$cwd", "--htmlroot=/", + "--quiet", ); } diff --git a/ext/Pod-Html/t/htmlview.t b/ext/Pod-Html/t/htmlview.t index 97e0536524..bbfc971a14 100644 --- a/ext/Pod-Html/t/htmlview.t +++ b/ext/Pod-Html/t/htmlview.t @@ -7,7 +7,7 @@ BEGIN { 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" ?> |