Commit | Line | Data |
e374d8da |
1 | #!perl |
2 | |
3 | use strict ; |
4 | use lib qw(t) ; |
5 | use common ; |
6 | |
7 | use File::Slurp ; |
8 | use Data::Dumper ; |
9 | |
10 | my $tests = [ |
11 | |
12 | { |
13 | name => 'bug', |
14 | skip => 0, |
15 | opts => { |
16 | |
17 | pre_delim => qr/\[\-/, |
18 | post_delim => qr/\-\]/, |
19 | }, |
20 | }, |
21 | data => { |
22 | widgets => [ |
23 | { |
24 | title => "bart" |
25 | }, |
26 | { |
27 | title => "marge", |
28 | } |
29 | ], |
30 | }, |
31 | |
32 | |
33 | |
34 | <table width="100%" border=1> |
35 | [-start widgets-] |
36 | <tr> |
37 | <td>[-anchor-]</td> |
38 | <td> |
39 | <b>[-title-]</b> |
40 | <br>[-description-] |
41 | </td> |
42 | <td>[-escaped_anchor-]</td> |
43 | <td>[-options-]</td> |
44 | </tr> |
45 | [-end widgets-] |
46 | </table> |
47 | |
48 | |
49 | expected => 'bar', |
50 | }, |
51 | ] ; |
52 | |
53 | |
54 | write_tmpl_files() ; |
55 | |
56 | template_tester( $tests ) ; |
57 | |
58 | #remove_tmpl_files() ; |
59 | |
60 | exit ; |
61 | |
62 | |
63 | sub write_tmpl_files { |
64 | |
65 | mkdir $_, 0755 for @tmpl_dirs ; |
66 | |
67 | while( my( $file, $tmpl ) = each %tmpl_files ) { |
68 | |
69 | write_file( $file, $tmpl ) ; |
70 | } |
71 | } |
72 | |
73 | sub remove_tmpl_files { |
74 | |
75 | unlink keys %tmpl_files ; |
76 | |
77 | rmdir $_ for reverse @tmpl_dirs ; |
78 | } |
79 | #!/usr/local/bin/perl |