[Templates-cvs] cvs commit: Template2/t fileline.t stash-xs.t vmeth.t wrapper.t gd.t gdgraph.t gdgraph3d.t gdtext.t gdtextalign.t gdtextwrap.t xmlsimple.t xmlstyle.t xpath.t
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/01/05 10:13:52
Modified: t fileline.t stash-xs.t vmeth.t wrapper.t
Removed: t gd.t gdgraph.t gdgraph3d.t gdtext.t gdtextalign.t
gdtextwrap.t xmlsimple.t xmlstyle.t xpath.t
Log:
* removed GD and XML tests
* added tests for list virtual methods in lvalues
Revision Changes Path
1.4 +2 -2 Template2/t/fileline.t
Index: fileline.t
===================================================================
RCS file: /template-toolkit/Template2/t/fileline.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- fileline.t 2004/01/13 08:59:57 1.3
+++ fileline.t 2006/01/05 10:13:51 1.4
@@ -12,7 +12,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: fileline.t,v 1.3 2004/01/13 08:59:57 abw Exp $
+# $Id: fileline.t,v 1.4 2006/01/05 10:13:51 abw Exp $
#
#========================================================================
@@ -91,6 +91,6 @@
-- expect --
Hello
World
-file: (eval 8)
+file: (eval 10)
line: 10
warn: Argument "" isn't numeric in addition (+)
2.7 +13 -1 Template2/t/stash-xs.t
Index: stash-xs.t
===================================================================
RCS file: /template-toolkit/Template2/t/stash-xs.t,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -r2.6 -r2.7
--- stash-xs.t 2005/03/03 19:18:22 2.6
+++ stash-xs.t 2006/01/05 10:13:51 2.7
@@ -13,7 +13,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: stash-xs.t,v 2.6 2005/03/03 19:18:22 abw Exp $
+# $Id: stash-xs.t,v 2.7 2006/01/05 10:13:51 abw Exp $
#
#========================================================================
@@ -262,3 +262,15 @@
hello, there
==
hello, there
+
+
+-- test --
+[% hash = { }
+ list = [ hash ]
+ list.last.message = 'Hello World';
+ "message: $list.last.message\n"
+-%]
+
+-- expect --
+message: Hello World
+
2.20 +15 -2 Template2/t/vmeth.t
Index: vmeth.t
===================================================================
RCS file: /template-toolkit/Template2/t/vmeth.t,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -r2.19 -r2.20
--- vmeth.t 2003/07/24 12:13:03 2.19
+++ vmeth.t 2006/01/05 10:13:51 2.20
@@ -13,7 +13,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: vmeth.t,v 2.19 2003/07/24 12:13:03 abw Exp $
+# $Id: vmeth.t,v 2.20 2006/01/05 10:13:51 abw Exp $
#
#========================================================================
@@ -33,6 +33,9 @@
$Template::Stash::LIST_OPS->{ odd } = \&odd;
$Template::Stash::LIST_OPS->{ jumble } = \&jumble;
+# make sure we're using the Perl stash
+$Template::Config::STASH = 'Template::Stash';
+
$Template::Stash::SCALAR_OPS->{ commify } = sub {
local $_ = shift;
my $c = shift || ",";
@@ -50,7 +53,7 @@
sub new {
my ($class, $name) = @_;
bless {
- _NAME => $name,
+ _NAME => $name,
}, $class;
}
sub name {
@@ -664,8 +667,18 @@
no match
+-- test --
+[% hash = { }
+ list = [ hash ]
+ list.last.message = 'Hello World';
+ "message: $list.last.message\n"
+-%]
+
+-- expect --
+message: Hello World
-- stop --
+
-- test --
[% var = 'foo'; var.replace('f(o+)$', 'b$1') %]
2.5 +17 -1 Template2/t/wrapper.t
Index: wrapper.t
===================================================================
RCS file: /template-toolkit/Template2/t/wrapper.t,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -r2.4 -r2.5
--- wrapper.t 2001/04/04 10:06:27 2.4
+++ wrapper.t 2006/01/05 10:13:51 2.5
@@ -12,7 +12,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: wrapper.t,v 2.4 2001/04/04 10:06:27 abw Exp $
+# $Id: wrapper.t,v 2.5 2006/01/05 10:13:51 abw Exp $
#
#========================================================================
@@ -185,4 +185,20 @@
%]
-- expect --
<a><b><c>FOO</c></b></a>
+
+-- stop --
+# This next text demonstrates a limitation in the parser
+# http://tt2.org/pipermail/templates/2006-January/008197.html
+
+-- test--
+[% BLOCK a; "<a>$content</a>"; END;
+ BLOCK b; "<b>$content</b>"; END;
+ BLOCK c; "<c>$content</c>"; END;
+ A='a';
+ B='b';
+ C='c';
+ WRAPPER $A + $B + $C; 'BAR'; END;
+%]
+-- expect --
+<a><b><c>BAR</c></b></a>