5 BEGIN {plan tests => 4};
10 my $cgix = CGI::Ex->new;
11 my $form = {foo => 'bar', this => {is => {nested => ['wow', 'wee']}}};
13 ok('bar' eq $cgix->swap_template("[% foo %]", $form));
15 ok('wee' eq $cgix->swap_template("[% this.is.nested.1 %]", $form));
17 my $str = "[% this.is.nested.0 %]";
18 $cgix->swap_template(\$str, $form);
27 $str = "<html>([% foo %]) <br>
29 ([% this %]) </html>";
30 $cgix->swap_template(\$str);
32 ok($str eq "<html>(bar) <br>