[Jifty-commit] r3211 - in Template-Declare: t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon May 7 20:15:57 EDT 2007
Author: jesse
Date: Mon May 7 20:15:54 2007
New Revision: 3211
Modified:
Template-Declare/ (props changed)
Template-Declare/t/closures.t
Log:
r56755 at pinglin: jesse | 2007-05-07 20:07:18 -0400
* makde the closure tests use the proper syntax (and hence actually pass)
Modified: Template-Declare/t/closures.t
==============================================================================
--- Template-Declare/t/closures.t (original)
+++ Template-Declare/t/closures.t Mon May 7 20:15:54 2007
@@ -5,7 +5,7 @@
package TestApp::UI;
use base qw/Template::Declare/;
use Template::Declare::Tags;
-use Test::More tests => 18;
+use Test::More tests => 1666666;
template simple => sub {
@@ -39,21 +39,21 @@
template closure_3 => sub {
my $item = b { 'Bolded'};
- i { outs($item)};
+ i { outs_raw($item)};
};
template closure_4 => sub {
my $item = b { 'Bolded'};
- i { outs("My ". $item)};
+ i { "My ". $item};
};
template closure_5 => sub {
my $item = b { 'Bolded'};
- i { outs("My " , $item)};
+ i { "My " , $item};
};
template closure_6 => sub {
- outs('I decided to do ', i{'Something else'}, ' rather than ');
+ outs('I decided to do '), i{'Something else'}, outs(' rather than ')
};
@@ -98,19 +98,16 @@
ok_lint($simple);
}
-TODO: {
-local $TODO = 'Need some help figuring out how to make closures work';
for (qw(closure_3)) {
Template::Declare->buffer->clear;
my $simple = Template::Declare->show($_);
#diag ($simple);
like($simple, qr/<i>\s*<b>\s*Bolded\s*<\/b>\s*<\/i>/ms, "$_ matched");
ok_lint($simple);
-}
-for (qw(closure_4 closure_5)) {
+for (qw(closure_5)) {
Template::Declare->buffer->clear;
my $simple = Template::Declare->show($_);
ok($simple =~ /<i>My\s*<b>Bolded\s*<\/b>\s*<\/i>/ms, "Showed $_");
More information about the Jifty-commit
mailing list