projects
/
webpac2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better utf8 test records
[webpac2]
/
t
/
5-output-tt.t
diff --git
a/t/5-output-tt.t
b/t/5-output-tt.t
index
1101580
..
a2b8d8a
100755
(executable)
--- a/
t/5-output-tt.t
+++ b/
t/5-output-tt.t
@@
-1,22
+1,18
@@
#!/usr/bin/perl -w
#!/usr/bin/perl -w
-use Test::More tests => 5;
-use Test::Exception;
-use Cwd qw/abs_path/;
-use blib;
use strict;
use strict;
+use blib;
+
+use Test::More tests => 5;
BEGIN {
BEGIN {
+use_ok( 'WebPAC::Test' );
use_ok( 'WebPAC::Output::TT' );
}
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",
ok(my $tt = new WebPAC::Output::TT(
include_path => "$abs_path../conf/output/tt",
- no_log => 1,
+ %LOG
), "new");
my $ds = {
), "new");
my $ds = {
@@
-40,5
+36,5
@@
throws_ok { $tt->apply( template => 'foo', data => [] ) } qr/error.*foo/, "apply
cmp_ok(my $text = $tt->apply( template => 'text.tt', data => $ds ), '=~', qr/Source.*foo/, "apply");
cmp_ok(my $text = $tt->apply( template => 'text.tt', data => $ds ), '=~', qr/Source.*foo/, "apply");
-diag $text;
+diag $text
if $debug
;