[Templates-cvs] cvs commit: TT3/t/parser vars.t

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


cvs         04/12/02 16:50:54

  Modified:    t/parser vars.t
  Log:
  * added a couple of tests
  
  Revision  Changes    Path
  1.8       +47 -2     TT3/t/parser/vars.t
  
  Index: vars.t
  ===================================================================
  RCS file: /template-toolkit/TT3/t/parser/vars.t,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- vars.t	2004/11/26 12:33:34	1.7
  +++ vars.t	2004/12/02 16:50:53	1.8
  @@ -10,7 +10,7 @@
   # This is free software; you can redistribute it and/or modify it
   # under the same terms as Perl itself.
   #
  -# $Id: vars.t,v 1.7 2004/11/26 12:33:34 abw Exp $
  +# $Id: vars.t,v 1.8 2004/12/02 16:50:53 abw Exp $
   #
   #========================================================================
   
  @@ -20,7 +20,7 @@
   use lib qw( ./lib ../lib ../../lib );
   use Template::Parser;
   use Template::Generator::Debug;
  -use Template::Test tests => 24, import => ':all';
  +use Template::Test tests => 26, import => ':all';
   
   our $DEBUG = 
   $Template::Generator::DEBUG =
  @@ -145,6 +145,51 @@
       >
     >
   >
  +
  +-- test var with args and comments --
  +-- block --
  +foo(      # this is a comment
  +     100  # one hundred
  +     1000 # one thousand
  +)
  +-- expect --
  +<variable:
  +  <node:
  +    <ident:foo>
  +    <args:
  +      <number:100>
  +      <number:1000>
  +    >
  +  >
  +>
  +
  +-- test var with named args and comments --
  +-- block --
  +foo(      # this is a comment
  +     a    # the variable a
  +     =    # equals
  +     100  # one hundred
  +     b    # while b
  +     =>   # equals
  +     1000 # one thousand
  +)
  +-- expect --
  +<variable:
  +  <node:
  +    <ident:foo>
  +    <args:
  +      <tuple:
  +        <ident:a>
  +        <number:100>
  +      >
  +      <tuple:
  +        <ident:b>
  +        <number:1000>
  +      >
  +    >
  +  >
  +>
  +
   
   -- test dotted --
   foo.bar