root/Inline-TT/trunk/t/01_add.t

Revision 612 (checked in by miyagawa, 18 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 use strict;
2 use Test::More 'no_plan';
3
4 use Inline 'TT';
5
6 is add(args => [ 0, 1 ]), 1, "0 + 1 = 1";
7 is add(args => [ -100, 100 ]), 0, "-100 + 100 = 0";
8
9 __END__
10 __TT__
11 [% BLOCK add %]
12 [% result = 0 %]
13 [% FOREACH arg = args %]
14   [% result = result + arg %]
15 [% END %]
16 [% result %]
17 [%- END %]
Note: See TracBrowser for help on using the browser.