File: 10-emptytemplate.t

package info (click to toggle)
libtext-microtemplate-perl 0.24-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 296 kB
  • sloc: perl: 1,725; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use Test::More tests => 4;
use Text::MicroTemplate ':all';

my $warn = q[];
$SIG{__WARN__} = sub {
    $warn = $_[0];
};

is render_mt('')->as_string, '', 'empty template ok';
is $warn, q[], 'no warnings occurred ok';

$warn = '';
is render_mt('0')->as_string, '0', '"0" template ok';
is $warn, q[], 'no warnings occurred ok';