3 use Test::More tests => 7;
10 use_ok( 'WebPAC::Output::JSON' );
13 ok(my $abs_path = abs_path($0), "abs_path");
14 $abs_path =~ s#/[^/]*$#/#; #
15 diag "abs_path: $abs_path";
17 ok(my $out = new WebPAC::Output::JSON({
18 path => "$abs_path/out/test.js",
21 ok( $out->init, 'init' );
27 'display' => [ 'foo' ]
32 'search' => [ 'bar' ],
33 'lookup_key' => [ 'bar' ]
35 'filename' => [ 'out/thes/001.html' ],
40 throws_ok { $out->add( ) } qr/need id/, 'add without params';
41 throws_ok { $out->add( 42 ) } qr/need ds/, 'add without ds';
43 ok( $out->add( 42, $ds ), 'add' );