#!/usr/bin/perl -w
-use Test::More tests => 5;
-use Test::Exception;
-use Cwd qw/abs_path/;
-use blib;
use strict;
+use lib 'lib';
+
+use Test::More tests => 5;
BEGIN {
+use_ok( 'WebPAC::Test' );
use_ok( 'WebPAC::Output::TT' );
}
-ok(my $abs_path = abs_path($0), "abs_path");
-$abs_path =~ s#/[^/]*$#/#;
-diag "abs_path: $abs_path";
-
ok(my $tt = new WebPAC::Output::TT(
include_path => "$abs_path../conf/output/tt",
- no_log => 1,
+ %LOG
), "new");
my $ds = {
'ID' => {
'name' => 'ID',
'tag' => 'IDths',
- 'swish' => [ 'bar' ],
+ 'search' => [ 'bar' ],
'lookup_key' => [ 'bar' ]
},
'filename' => [ 'out/thes/001.html' ],
cmp_ok(my $text = $tt->apply( template => 'text.tt', data => $ds ), '=~', qr/Source.*foo/, "apply");
-diag $text;
+diag $text if $debug;