X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fweb%2Fcompilation_errors.t;h=e4845e0defdce29a641b4d3a5e90eccf4a33f734;hb=aad287228dfbe5ef01be73ebaaa9a06dfbe11226;hp=1f82ab91f07d88a2d9424663050360d05fdef89f;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4;p=freeside.git diff --git a/rt/t/web/compilation_errors.t b/rt/t/web/compilation_errors.t index 1f82ab91f..e4845e0de 100644 --- a/rt/t/web/compilation_errors.t +++ b/rt/t/web/compilation_errors.t @@ -1,22 +1,20 @@ -#!/usr/bin/perl - use strict; +use warnings; use Test::More; use File::Find; BEGIN { sub wanted { -f && /\.html$/ && $_ !~ /Logout.html$/ && $File::Find::dir !~ /RichText/; } - my $tests = 8; + my $tests = 7; find( sub { wanted() and $tests += 4 }, 'share/html/' ); - plan tests => $tests; + plan tests => $tests + 1; # plus one for warnings check } use HTTP::Request::Common; use HTTP::Cookies; use LWP; -use Encode; my $cookie_jar = HTTP::Cookies->new; @@ -38,12 +36,10 @@ is($agent->status, 200, "Fetched the page ok"); $agent->content_contains('Logout', "Found a logout link"); -find ( sub { wanted() and test_get($agent, $File::Find::name) } , 'share/html/'); +find ( { wanted => sub { wanted() and test_get($agent, $File::Find::name) }, no_chdir => 1 } , 'share/html/'); -TODO: { - local $TODO = "we spew *lots* of undef warnings"; - $agent->no_warnings_ok; -}; +# We expect to spew a lot of warnings; toss them away +$agent->get_warnings; sub test_get { my $agent = shift;