### ----------------------------------------------------
### -- Template6
### -- Licenses: Artistic-2.0
### -- Authors: Timothy Totten
### -- File: t/05-includes.rakutest
### ----------------------------------------------------
use Test;
use Template6;

plan 4;

my $t6 = Template6.new;
$t6.add-path: 't/templates';

my $wanted = "<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
";

is $t6.process('insert'), $wanted, 'INSERT statement';
is $t6.process('include2'), $wanted, 'INCLUDE statement with local template data';

$wanted = "<html>
<head>
<title>Hello Tomorrow</title>
</head>
<body>
<h1>Hello Tomorrow</h1>
<h1>Hello World</h1>
</body>
</html>
";

is $t6.process('include', :name<Tomorrow>, :included<inserted>), $wanted, 'INCLUDE statement';

$wanted = "<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello Universe</h1>
<h2>That's right, it changed to Universe</h2>
</body>
</html>
";


is $t6.process('process', :name<World>), $wanted, 'PROCESS statement';

# vim: expandtab shiftwidth=4


