[Templates-cvs] cvs commit: TT3/t compiler.t

cvs@template-toolkit.org cvs@template-toolkit.org
Thu, 02 Dec 2004 19:16:18 +0000


cvs         04/12/02 19:16:18

  Modified:    t        compiler.t
  Log:
  * more tests
  
  Revision  Changes    Path
  1.18      +25 -3     TT3/t/compiler.t
  
  Index: compiler.t
  ===================================================================
  RCS file: /template-toolkit/TT3/t/compiler.t,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- compiler.t	2004/12/01 17:57:22	1.17
  +++ compiler.t	2004/12/02 19:16:17	1.18
  @@ -9,7 +9,7 @@
   # This is free software; you can redistribute it and/or modify it
   # under the same terms as Perl itself.
   #
  -# $Id: compiler.t,v 1.17 2004/12/01 17:57:22 abw Exp $
  +# $Id: compiler.t,v 1.18 2004/12/02 19:16:17 abw Exp $
   #
   #========================================================================
   
  @@ -22,11 +22,11 @@
   use Template::Context;
   use Template::Resource::Variable;
   use Template::Resources;
  -use Template::Test tests => 22, import => ':all';
  +use Template::Test tests => 24, import => ':all';
   
   my $DEBUG = 
   $Template::Compiler::DEBUG =
  -$Template::Tagset::DEBUG =
  +$Template::Parser::DEBUG =
   grep(/^--?d(ebug)?/, @ARGV);
   
   
  @@ -397,6 +397,28 @@
   -- expect --
   <ERROR:line 1: no closing tag to match [%>
   
  +-- test expression --
  +[% ( 5 + 5 ) * 10 %]
  +-- expect --
  +100
  +
  +-- test comments in expressions --
  +[% (   # start parens
  +     5 # plus
  +     + # plus
  +     5 # five
  +   )  
  +   *   # end parens
  +   10 
  +%]
  +-- expect --
  +100
  +
  +-- test error --
  +[% a + %]
  +-- expect --
  +<ERROR:line 1: parser error - unexpected end of directive tag after '+'>
  +   
   __END__
   
   # Local Variables: