X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F5-output-json.t;h=f53b2e59fc98c394a313948c1095ead57792812b;hb=919fc39cb7fab3aa7e18eeb01ba3954bb3b7ab67;hp=778dfc89010e7031d6a41aaf56ae8f45ba447ccc;hpb=7f55d41f08c923a06a23449411209e51b5359257;p=webpac2 diff --git a/t/5-output-json.t b/t/5-output-json.t index 778dfc8..f53b2e5 100755 --- a/t/5-output-json.t +++ b/t/5-output-json.t @@ -1,26 +1,20 @@ #!/usr/bin/perl -w +use strict; +use lib 'lib'; + use Test::More tests => 14; -use Test::Exception; -use Cwd qw/abs_path/; + use JSON; -use File::Slurp; -use Data::Dump qw/dump/; -use blib; -use strict; BEGIN { +use_ok( 'WebPAC::Test' ); use_ok( 'WebPAC::Output::JSON' ); } -my $debug = shift @ARGV; - -ok(my $abs_path = abs_path($0), "abs_path"); -$abs_path =~ s#/[^/]*$#/#; # -diag "abs_path: $abs_path"; my $path = "$abs_path/out/test.js"; -ok(my $out = new WebPAC::Output::JSON({ path => $path }), "new"); +ok(my $out = new WebPAC::Output::JSON({ path => $path, %LOG }), "new"); ok( $out->init, 'init' );