1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
|
use strict; |
4 |
|
use blib; |
5 |
|
|
6 |
use Test::More tests => 14; |
use Test::More tests => 14; |
7 |
use Test::Exception; |
|
|
use Cwd qw/abs_path/; |
|
8 |
use JSON; |
use JSON; |
|
use File::Slurp; |
|
|
use Data::Dump qw/dump/; |
|
|
use blib; |
|
|
use strict; |
|
9 |
|
|
10 |
BEGIN { |
BEGIN { |
11 |
|
use_ok( 'WebPAC::Test' ); |
12 |
use_ok( 'WebPAC::Output::JSON' ); |
use_ok( 'WebPAC::Output::JSON' ); |
13 |
} |
} |
14 |
|
|
|
my $debug = shift @ARGV; |
|
|
|
|
|
ok(my $abs_path = abs_path($0), "abs_path"); |
|
|
$abs_path =~ s#/[^/]*$#/#; # |
|
|
diag "abs_path: $abs_path"; |
|
15 |
my $path = "$abs_path/out/test.js"; |
my $path = "$abs_path/out/test.js"; |
16 |
|
|
17 |
ok(my $out = new WebPAC::Output::JSON({ path => $path }), "new"); |
ok(my $out = new WebPAC::Output::JSON({ path => $path, %LOG }), "new"); |
18 |
|
|
19 |
ok( $out->init, 'init' ); |
ok( $out->init, 'init' ); |
20 |
|
|