[Templates-cvs] cvs commit: TT3/t source.t
cvs@template-toolkit.org
cvs@template-toolkit.org
Mon, 29 Mar 2004 17:37:29 +0100
cvs 04/03/29 16:37:29
Modified: t source.t
Log:
* fixed tests to account for new text_ref() and code_ref() methods,
and changes to text() and code()
Revision Changes Path
1.2 +8 -6 TT3/t/source.t
Index: source.t
===================================================================
RCS file: /template-toolkit/TT3/t/source.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- source.t 2004/03/23 14:58:18 1.1
+++ source.t 2004/03/29 16:37:29 1.2
@@ -9,7 +9,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: source.t,v 1.1 2004/03/23 14:58:18 abw Exp $
+# $Id: source.t,v 1.2 2004/03/29 16:37:29 abw Exp $
#
#========================================================================
@@ -19,7 +19,7 @@
use lib qw( ./lib ../lib );
use Template::Source;
use Template::Provider;
-use Test::More tests => 37;
+use Test::More tests => 39;
my $DEBUG =
$Template::Source::DEBUG =
@@ -76,13 +76,15 @@
});
ok( $src, 'created wam source' );
-$text = $src->text();
+$text = $src->text_ref();
ok( $text, 'got wam text' );
is( $$text, 'wam text', 'wam text correct' );
+is( $src->text(), 'wam text', 'got wam text direct' );
-$code = $src->code();
+$code = $src->code_ref();
ok( $code, 'got wam code' );
is( $$code, 'wam code', 'wam code correct' );
+is( $src->code(), 'wam code', 'got wam code direct' );
$text = "bam text";
$code = "bam code";
@@ -93,8 +95,8 @@
code => \$code,
});
ok( $src, 'created bam source' );
-is( ${ $src->text() }, 'bam text', 'got bam text' );
-is( ${ $src->code() }, 'bam code', 'got bam code' );
+is( $src->text(), 'bam text', 'got bam text' );
+is( $src->code(), 'bam code', 'got bam code' );
#------------------------------------------------------------------------