summaryrefslogtreecommitdiff
path: root/t/tests/maker.t
blob: 4d21a0fb9e00cb8785b432ca4355272fc20458a9 (plain)
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
# -*- mode: perl6 -*- 
use Test;
use lib 't/lib';
use Test::WebCoso;
use File::Temp;
use WebCoso;
use WebCoso::Maker::TT;
 
my $testdir = tempdir.IO;
my $srcdir = $testdir.child('src');
my $destdir = $testdir.child('dst');
 
$srcdir.mkdir;
$destdir.mkdir;
 
$srcdir.child('document.it.tt').spurt('it');
$srcdir.child('document.en.tt').spurt('en');
 
my $wc = WebCoso.new(:$srcdir,:$destdir);
 
my $m = WebCoso::Maker::TT.new(basename=>'document',dir=>'',:$wc);
 
my %output = $m.make();
 
cmp-files(
    %output,
    {
        en => { $^x.contents eq 'en expanded' },
        it => { $^x.contents eq 'it expanded' },
    },
    'made the files',
);
 
done-testing;