diff options
author | Robin Barker <rmbarker@cpan.org> | 2010-04-22 11:51:20 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-04-26 15:44:56 +0200 |
commit | 8d66b3f930dc6d88b524d103e304308ae73a46e7 (patch) | |
tree | a3e92f564e382de0cc1e536bc65c318a5a5c893a /lib/h2ph.t | |
parent | 9500e8e2396502af05bf3891caf7e5d5cc9dc8d9 (diff) | |
download | perl-8d66b3f930dc6d88b524d103e304308ae73a46e7.tar.gz |
Fix h2ph and test
Diffstat (limited to 'lib/h2ph.t')
-rw-r--r-- | lib/h2ph.t | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/h2ph.t b/lib/h2ph.t index 27dd7b9d0a..8d62d469a9 100644 --- a/lib/h2ph.t +++ b/lib/h2ph.t @@ -18,7 +18,7 @@ if (!(-e $extracted_program)) { exit 0; } -plan(4); +plan(5); # quickly compare two text files sub txt_compare { @@ -41,8 +41,16 @@ $result = runperl( progfile => 'lib/h2ph.pht', stderr => 1 ); like( $result, qr/syntax OK$/, "output compiles"); +$result = runperl( progfile => '_h2ph_pre.ph', + switches => ['-c'], + stderr => 1 ); +like( $result, qr/syntax OK$/, "preamble compiles"); + $result = runperl( switches => ["-w"], - prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);'); + stderr => 1, + prog => <<'PROG' ); +$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht); +PROG is( $result, '', "output free of warnings" ); # cleanup |