diff options
author | Michiel Beijen <mb@x14.nl> | 2021-12-30 12:54:11 +0100 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2022-01-04 19:38:23 +0000 |
commit | ab296d81b5061ec95a94e6652d26900a71070672 (patch) | |
tree | d07a292f84e4a9900d661c6b664f63229ae62175 /ext/Pod-Html | |
parent | daa4167df8f7241fe8b17fe78b98ef91fa9410a5 (diff) | |
download | perl-ab296d81b5061ec95a94e6652d26900a71070672.tar.gz |
Pod::Html: improve all tests
"use warnings;" in all tests. Remove emacs identifiers. Change tabs to
spaces in tests.
For: https://github.com/Perl/perl5/pull/19304
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r-- | ext/Pod-Html/t/anchorify-536.t | 8 | ||||
-rw-r--r-- | ext/Pod-Html/t/anchorify.t | 7 | ||||
-rw-r--r-- | ext/Pod-Html/t/cache.t | 5 | ||||
-rw-r--r-- | ext/Pod-Html/t/crossref.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/crossref2.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/crossref3.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/eol.t | 12 | ||||
-rw-r--r-- | ext/Pod-Html/t/feature.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/feature2.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir1.t | 5 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir2.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir3.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir4.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmldir5.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmlescp.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmllink.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/htmlview.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/poderr.t | 6 | ||||
-rw-r--r-- | ext/Pod-Html/t/podnoerr.t | 8 |
19 files changed, 61 insertions, 62 deletions
diff --git a/ext/Pod-Html/t/anchorify-536.t b/ext/Pod-Html/t/anchorify-536.t index aeb34e6e81..e8e01ea9c5 100644 --- a/ext/Pod-Html/t/anchorify-536.t +++ b/ext/Pod-Html/t/anchorify-536.t @@ -1,15 +1,11 @@ -# -*- perl -*- - use strict; +use warnings; use Pod::Html qw( anchorify relativize_url ); my ($revision,$version,$subversion) = split /\./, sprintf("%vd",$^V); use Test::More; unless ($version == 35 or $version == 36) { plan skip_all => "Needed only during 5.36"; } -else { - plan tests => 3; -} my @filedata; { @@ -62,6 +58,8 @@ is_deeply( is($relativized_url, $expected_relativized_url, "relativize_url() returned expected value"); } +done_testing; + __DATA__ =head1 NAME diff --git a/ext/Pod-Html/t/anchorify.t b/ext/Pod-Html/t/anchorify.t index 2778cf04f6..6d14eb39cc 100644 --- a/ext/Pod-Html/t/anchorify.t +++ b/ext/Pod-Html/t/anchorify.t @@ -1,8 +1,7 @@ -# -*- perl -*- - use strict; +use warnings; use Pod::Html::Util qw( anchorify relativize_url ); -use Test::More tests => 3; +use Test::More; my @filedata; { @@ -55,6 +54,8 @@ is_deeply( is($relativized_url, $expected_relativized_url, "relativize_url() returned expected value"); } +done_testing; + __DATA__ =head1 NAME diff --git a/ext/Pod-Html/t/cache.t b/ext/Pod-Html/t/cache.t index 7a261fb4eb..54190d360a 100644 --- a/ext/Pod-Html/t/cache.t +++ b/ext/Pod-Html/t/cache.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 10; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; use Pod::Html::Util qw( @@ -82,3 +80,4 @@ close $cache; is(-f $cachefile, undef, "No cache file to end"); is(-f $tcachefile, undef, "No cache file to end"); +done_testing; diff --git a/ext/Pod-Html/t/crossref.t b/ext/Pod-Html/t/crossref.t index 5ba28de9e3..c6e8435657 100644 --- a/ext/Pod-Html/t/crossref.t +++ b/ext/Pod-Html/t/crossref.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -40,6 +38,8 @@ $args = { }; xconvert($args); +done_testing; + __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/crossref2.t b/ext/Pod-Html/t/crossref2.t index 9398c11f51..776c021f8a 100644 --- a/ext/Pod-Html/t/crossref2.t +++ b/ext/Pod-Html/t/crossref2.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; use Pod::Html::Util qw( @@ -41,6 +39,8 @@ $args = { }; xconvert($args); +done_testing; + __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/crossref3.t b/ext/Pod-Html/t/crossref3.t index 919cfdfd70..c8a8bf6063 100644 --- a/ext/Pod-Html/t/crossref3.t +++ b/ext/Pod-Html/t/crossref3.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -38,6 +36,8 @@ $args = { }; xconvert($args); +done_testing; + __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/eol.t b/ext/Pod-Html/t/eol.t index ba04def1af..c6bcea9746 100644 --- a/ext/Pod-Html/t/eol.t +++ b/ext/Pod-Html/t/eol.t @@ -1,7 +1,7 @@ -#!./perl -w - +use strict; +use warnings; use Pod::Html; -use Test::More tests => 3; +use Test::More; my $podfile = "$$.pod"; my $infile = "$$.in"; @@ -40,8 +40,8 @@ foreach my $eol ("\r", "\n", "\r\n") { open $pod, '<', $podfile or die "$podfile: $!"; open my $in, '>', $infile or die "$infile: $!"; while (<$pod>) { - s/[\r\n]+/$eol/g; - print $in $_; + s/[\r\n]+/$eol/g; + print $in $_; } close $pod or die $!; close $in or die $!; @@ -68,3 +68,5 @@ is($cksum[1], $cksum[2], "LF vs CRLF"); END { 1 while unlink $podfile, $infile, @outfile, 'pod2htmd.tmp'; } + +done_testing; diff --git a/ext/Pod-Html/t/feature.t b/ext/Pod-Html/t/feature.t index f44cadea14..72aef3e8c6 100644 --- a/ext/Pod-Html/t/feature.t +++ b/ext/Pod-Html/t/feature.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -43,6 +41,8 @@ $args = { }; xconvert($args); +done_testing; + __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/feature2.t b/ext/Pod-Html/t/feature2.t index c8f8025aa3..fcf8e831a2 100644 --- a/ext/Pod-Html/t/feature2.t +++ b/ext/Pod-Html/t/feature2.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -52,6 +50,8 @@ like($warn, )x, "misc pod-html --verbose warnings"); +done_testing; + __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 c705f81a3f..9185698267 100644 --- a/ext/Pod-Html/t/htmldir1.t +++ b/ext/Pod-Html/t/htmldir1.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -57,6 +55,7 @@ $args = { }; xconvert($args); +done_testing; __DATA__ <?xml version="1.0" ?> diff --git a/ext/Pod-Html/t/htmldir2.t b/ext/Pod-Html/t/htmldir2.t index 95b40facea..143c1ab96e 100644 --- a/ext/Pod-Html/t/htmldir2.t +++ b/ext/Pod-Html/t/htmldir2.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -62,6 +60,8 @@ $args = { }; xconvert($args); +done_testing; + __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/htmldir3.t b/ext/Pod-Html/t/htmldir3.t index e02863b9eb..e29a4f1769 100644 --- a/ext/Pod-Html/t/htmldir3.t +++ b/ext/Pod-Html/t/htmldir3.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -75,6 +73,8 @@ $args = { }; xconvert($args); +done_testing; + __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/htmldir4.t b/ext/Pod-Html/t/htmldir4.t index 8157167c3f..52d9d7d447 100644 --- a/ext/Pod-Html/t/htmldir4.t +++ b/ext/Pod-Html/t/htmldir4.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -53,6 +51,8 @@ $args = { }; xconvert($args); +done_testing; + __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/htmldir5.t b/ext/Pod-Html/t/htmldir5.t index 566176108b..bac4977fd5 100644 --- a/ext/Pod-Html/t/htmldir5.t +++ b/ext/Pod-Html/t/htmldir5.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -42,6 +40,8 @@ $args = { }; xconvert($args); +done_testing; + __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/htmlescp.t b/ext/Pod-Html/t/htmlescp.t index 32115fc66a..049a380f09 100644 --- a/ext/Pod-Html/t/htmlescp.t +++ b/ext/Pod-Html/t/htmlescp.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -31,6 +29,8 @@ $args = { xconvert($args); +done_testing; + __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/htmllink.t b/ext/Pod-Html/t/htmllink.t index 01787555e2..c0a9a32488 100644 --- a/ext/Pod-Html/t/htmllink.t +++ b/ext/Pod-Html/t/htmllink.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -31,6 +29,8 @@ $args = { xconvert($args); +done_testing; + __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/htmlview.t b/ext/Pod-Html/t/htmlview.t index f73418bb56..30c9b54de9 100644 --- a/ext/Pod-Html/t/htmlview.t +++ b/ext/Pod-Html/t/htmlview.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -34,6 +32,8 @@ $args = { xconvert($args); +done_testing; + __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/poderr.t b/ext/Pod-Html/t/poderr.t index f058df7bd4..8ca2f4cbc2 100644 --- a/ext/Pod-Html/t/poderr.t +++ b/ext/Pod-Html/t/poderr.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -32,6 +30,8 @@ $args = { xconvert($args); +done_testing; + __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/podnoerr.t b/ext/Pod-Html/t/podnoerr.t index b333e4249a..880653d453 100644 --- a/ext/Pod-Html/t/podnoerr.t +++ b/ext/Pod-Html/t/podnoerr.t @@ -1,5 +1,3 @@ -# -*- perl -*- - BEGIN { use File::Spec::Functions ':ALL'; @INC = map { rel2abs($_) } @@ -8,7 +6,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Testing qw( setup_testing_dir xconvert ); use Cwd; @@ -27,12 +25,14 @@ $args = { description => "pod error section", expect => $expect_raw, p2h => { - nopoderrors => 1, + nopoderrors => 1, }, }; xconvert($args); +done_testing; + __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"> |