[Templates-cvs] cvs commit: TT3/t/directive macro.t

cvs@template-toolkit.org cvs@template-toolkit.org
Fri, 03 Dec 2004 08:11:19 +0000


cvs         04/12/03 08:11:19

  Modified:    t/directive macro.t
  Log:
  * fixed some error messages
  
  Revision  Changes    Path
  1.7       +6 -4      TT3/t/directive/macro.t
  
  Index: macro.t
  ===================================================================
  RCS file: /template-toolkit/TT3/t/directive/macro.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- macro.t	2004/12/01 18:22:26	1.6
  +++ macro.t	2004/12/03 08:11:18	1.7
  @@ -9,7 +9,7 @@
   # This is free software; you can redistribute it and/or modify it
   # under the same terms as Perl itself.
   #
  -# $Id: macro.t,v 1.6 2004/12/01 18:22:26 abw Exp $
  +# $Id: macro.t,v 1.7 2004/12/03 08:11:18 abw Exp $
   #
   #========================================================================
   
  @@ -29,6 +29,7 @@
   $Template::Directive::DEBUG =
   $Template::Scanner::DEBUG =
   grep(/^--?d(ebug)?/, @ARGV);
  +our $STEP = (grep /^--?s(tep)?/, @ARGV);
   
   my $scanpkg = 'Template::TT3::Scanner';
   my $genpkg  = 'Template::Generator::Debug';
  @@ -42,6 +43,7 @@
   test_expect({
       handler => \&parse, 
       debug   => $DEBUG,
  +    step    => $STEP,
   });
   
   sub parse {
  @@ -70,17 +72,17 @@
   -- test missing ident --
   [% MACRO %]
   -- expect --
  -<ERROR:line 1: error in MACRO definition: no identifier>
  +<ERROR:line 1: error in MACRO definition: not an identifier>
   
   -- test invalid ident --
   [% MACRO INCLUDE %]
   -- expect --
  -<ERROR:line 1: error in MACRO definition: no identifier, got directive keyword: INCLUDE>
  +<ERROR:line 1: error in MACRO definition: not an identifier (got keyword: INCLUDE)>
   
   -- test bad name --
   [% MACRO $blam %]
   -- expect --
  -<ERROR:line 1: error in MACRO definition: no identifier>
  +<ERROR:line 1: error in MACRO definition: not an identifier>
   
   -- test bad arg --
   [% MACRO wiz($bang) %]