[Jifty-commit] r2474 - Template-Declare/t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Jan 6 05:13:35 EST 2007


Author: clkao
Date: Sat Jan  6 05:13:34 2007
New Revision: 2474

Modified:
   Template-Declare/t/roots.t

Log:
failing tests for imported template that uses base.

Modified: Template-Declare/t/roots.t
==============================================================================
--- Template-Declare/t/roots.t	(original)
+++ Template-Declare/t/roots.t	Sat Jan  6 05:13:34 2007
@@ -9,6 +9,10 @@
     div { outs('This is imported from'.$self) };
 };
 
+package Wifty::UI::something2;
+use base qw/Wifty::UI::something/;
+use Template::Declare::Tags;
+
 package Wifty::UI;
 use base qw/Template::Declare/;
 use Template::Declare::Tags;
@@ -30,6 +34,7 @@
 
 
 import Wifty::UI::something under '/something';
+import Wifty::UI::something2 under '/something2';
 
 
 package Baseclass::UI;
@@ -60,7 +65,7 @@
 use Template::Declare::Tags;
 Template::Declare->init(roots => ['Baseclass::UI', 'Wifty::UI']);
 
-use Test::More tests => 12;
+use Test::More tests => 15;
 use HTML::Lint;
 
 {
@@ -102,6 +107,14 @@
     ok_lint($simple);
 }
 
+{
+    local $Template::Declare::Tags::BUFFER;
+    my $simple = ( show('something2/imported') );
+    like( $simple, qr'This is imported' );
+    like( $simple, qr'Wifty::UI::something2', '$self is correct in template block' );
+    ok_lint($simple);
+}
+
 sub ok_lint {
     my $html = shift;
 


More information about the Jifty-commit mailing list