I am trying to create a test file that injects the values of a template into a string using the template toolkit, but I do not know what checks / checks to include to make sure that the template toolbox handles the string correctly. Here is my code:
use lib ('./t/lib/');
use strict;
use warnings;
use Template;
use Test::More tests => 1;
my $config = {
RELATIVE => 1,
OUTPUT_PATH => './out',
};
my $template = Template->new($config);
my $text = "This is string number [%num%] .";
my $vars = {
num => "one",
};
my $create_temp = $template->process(\$text, $vars)
|| die "Template process failed: ", $template->error(), "\n";
diag($template->process(\$text, $vars));
diag 1, , , , stdout, , . stdout , . stderr .
, . , , Template Toolkit ?
- , , .