#!/usr/bin/perl -w
-use Test::More tests => 16;
-use Test::Exception;
-use Cwd qw/abs_path/;
-use Data::Dump qw/dump/;
-use blib;
use strict;
+use blib;
+
+use Test::More tests => 16;
BEGIN {
+use_ok( 'WebPAC::Test' );
use_ok( 'WebPAC::Output::Sorted' );
}
-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/sorted/";
ok(my $out = new WebPAC::Output::Sorted({
path => $path,
database => 'test',
clean => 1,
- debug => $debug,
+ %LOG
}), "new");
ok( $out->init, 'init' );
ok( -e $out->path, "created $path" );
-diag $out->path," eq ",$path;
+diag $out->path," eq ",$path if $debug;
cmp_ok( $out->path, 'eq', $path, 'path' );
ok( $out->finish, 'finish' );