[Templates-svn] r1107 - trunk/t
svn at template-toolkit.org
svn at template-toolkit.org
Tue Jan 22 22:58:32 GMT 2008
Author: sean
Date: 2008-01-22 22:58:24 +0000 (Tue, 22 Jan 2008)
New Revision: 1107
Modified:
trunk/t/compile2.t
trunk/t/constants.t
Log:
Forces scalar context on pattern-match arguments to Template::Test::ok().
Modified: trunk/t/compile2.t
===================================================================
--- trunk/t/compile2.t 2008-01-21 19:05:30 UTC (rev 1106)
+++ trunk/t/compile2.t 2008-01-22 22:58:24 UTC (rev 1107)
@@ -40,7 +40,7 @@
my $out = '';
my $tt = Template->new($ttcfg);
ok( $tt->process('baz', { showname => 1 }, \$out) );
-ok( $out =~ /^name: baz/ );
+ok( scalar $out =~ /^name: baz/ );
# we're going to hack on the foo.ttc file to change some key text.
# this way we can tell that the template was loaded from the compiled
Modified: trunk/t/constants.t
===================================================================
--- trunk/t/constants.t 2008-01-21 19:05:30 UTC (rev 1106)
+++ trunk/t/constants.t 2008-01-22 22:58:24 UTC (rev 1107)
@@ -76,9 +76,9 @@
my $text = $parsed->{ BLOCK };
-ok( $text =~ /'Andy 'Da Man' Wardley'/, 'author folded' );
-ok( $text =~ /"back is " . '#ffffff'/, 'col.back folded' );
-ok( $text =~ /stash->get\(\['col', 0, 'user', 0\]\)/, 'col.user unfolded' );
+ok( scalar $text =~ /'Andy \\'Da Man\\' Wardley'/, 'author folded' );
+ok( scalar $text =~ /"back is " . '#ffffff'/, 'col.back folded' );
+ok( scalar $text =~ /stash->get\(\['col', 0, 'user', 0\]\)/, 'col.user unfolded' );
$parser = Template::Parser->new({
@@ -100,9 +100,9 @@
$text = $parsed->{ BLOCK };
-ok( $text =~ /'Andy 'Da Man' Wardley'/, 'author folded' );
-ok( $text =~ /"back is " . '#ffffff'/, 'col.back folded' );
-ok( $text =~ /stash->get\(\['col', 0, 'user', 0\]\)/, 'col.user unfolded' );
+ok( scalar $text =~ /'Andy \\'Da Man\\' Wardley'/, 'author folded' );
+ok( scalar $text =~ /"back is " . '#ffffff'/, 'col.back folded' );
+ok( scalar $text =~ /stash->get\(\['col', 0, 'user', 0\]\)/, 'col.user unfolded' );
#------------------------------------------------------------------------
More information about the templates-svn
mailing list