#!perl

use strict ;
use lib qw(t) ;
use common ;

use File::Slurp ;
use Data::Dumper ;

my $tests = [

	{
		name	=> 'bug',
		skip	=> 0,
		opts	=> {

			pre_delim  => qr/\[\-/,
			post_delim => qr/\-\]/,
		},
		},
		data	=> {
			widgets => [
				{
					title => "bart"
				},
		                {
					title => "marge",
				}
			],
		},



<table width="100%" border=1>
     [-start widgets-]
     <tr>
     <td>[-anchor-]</td>
     <td>
         <b>[-title-]</b>
         <br>[-description-]
     </td>
     <td>[-escaped_anchor-]</td>
     <td>[-options-]</td>
     </tr>
         [-end widgets-]
</table>


		expected => 'bar',
	},
] ;


write_tmpl_files() ;

template_tester( $tests ) ;

#remove_tmpl_files() ;

exit ;


sub write_tmpl_files {

	mkdir $_, 0755 for @tmpl_dirs ;

	while( my( $file, $tmpl ) = each %tmpl_files ) {

		write_file( $file, $tmpl ) ;
	}
}

sub remove_tmpl_files {

	unlink keys %tmpl_files ;
	
	rmdir $_ for reverse @tmpl_dirs ;
}
#!/usr/local/bin/perl
