[Templates-cvs] cvs commit: TT3/t/directive set.t
cvs@template-toolkit.org
cvs@template-toolkit.org
Fri, 03 Dec 2004 14:17:01 +0000
cvs 04/12/03 14:17:01
Modified: t/directive set.t
Log:
* fixed some broken tests and add an implicit SET test
Revision Changes Path
1.5 +22 -3 TT3/t/directive/set.t
Index: set.t
===================================================================
RCS file: /template-toolkit/TT3/t/directive/set.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- set.t 2004/12/03 08:23:11 1.4
+++ set.t 2004/12/03 14:17:01 1.5
@@ -9,7 +9,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: set.t,v 1.4 2004/12/03 08:23:11 abw Exp $
+# $Id: set.t,v 1.5 2004/12/03 14:17:01 abw Exp $
#
#========================================================================
@@ -23,11 +23,12 @@
use Template::Directive::Set;
use Template::Generator::Debug;
use Template::Generator::Perl;
-use Template::Test tests => 12, import => ':all';
+use Template::Test tests => 14, import => ':all';
our $DEBUG =
$Template::Directive::Set::DEBUG =
$Template::Directive::DEBUG =
+$Template::Tag::Directive::DEBUG =
grep(/^--?d(ebug)?/, @ARGV);
our $STEP = grep(/^--?s(tep)?/, @ARGV);
@@ -89,7 +90,24 @@
__END__
--- test set --
+-- test implicit set --
+[% x = 10 %]
+-- expect --
+<template:
+ <line:1>
+ <set:
+ [
+ <variable:
+ <node:
+ <ident:x>
+ >
+ >
+ <number:10>
+ ]
+ >
+>
+
+-- test explicit set --
[% SET x = 10 %]
-- expect --
<template:
@@ -105,6 +123,7 @@
]
>
>
+
-- test set with comments --
[% # this is a comment