File: basic.t

package info (click to toggle)
libdata-section-simple-perl 0.07-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 132 kB
  • sloc: perl: 66; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use strict;
use Data::Section::Simple qw(get_data_section);
use Test::More;

my $x = get_data_section();
is_deeply [ sort keys %$x ], [ qw(bar.tt foo.html) ];

is get_data_section('foo.html'), <<HTML;
<html>
<body>Foo</body>
</html>

HTML

is get_data_section('bar.tt'), <<TT;
[% IF foo %]
bar
[% END %]

TT

done_testing;

__DATA__

@@ foo.html
<html>
<body>Foo</body>
</html>

@@ bar.tt  
[% IF foo %]
bar
[% END %]

__END__

=head1 NAME

basic.t

=cut