added test for token_re option
Uri Guttman [Wed, 9 May 2012 07:15:26 +0000 (03:15 -0400)]
t/options.t

index 320fe15..9500206 100644 (file)
@@ -175,6 +175,24 @@ foo
 [%END FOO%]
 EXPECTED
        },
+       {
+               name    => 'token_id',
+               opts    => {
+                       token_id => qw/[-\w]+?/,
+               },
+               data    => {
+                       'foo-bar'       => 'FOO is 3',
+                       'BAR-BAZ'       => 'bar is baz',
+               },
+               template => <<TEMPLATE,
+[%foo-bar%]
+[%BAR-BAZ%]
+TEMPLATE
+               expected => <<EXPECTED,
+FOO is 3
+bar is baz
+EXPECTED
+       },
 ] ;
 
 template_tester( $tests ) ;