/home/.cpan/build/Text-Template-1.61-0/t
NameSizeModeActions
author-pod-syntax.t3000644editdlrm
author-signature.t4310644editdlrm
basic.t53140755editdlrm
broken.t16110755editdlrm
delimiters.t28030755editdlrm
error.t8080755editdlrm
exported.t18610755editdlrm
hash.t26820755editdlrm
inline-comment.t3220755editdlrm
nested-tags.t5660755editdlrm
ofh.t6650755editdlrm
out.t10860755editdlrm
prepend.t19270755editdlrm
preprocess.t12850755editdlrm
rt29928.t5530755editdlrm
safe.t38320755editdlrm
safe2.t25680755editdlrm
safe3.t19350755editdlrm
strict.t12640755editdlrm
taint.t34310750editdlrm
template-encoding.t9440755editdlrm
warnings.t12820755editdlrm
Edit: /home/.cpan/build/Text-Template-1.61-0/t/warnings.t (1282B)
#!perl use strict; use warnings; use Text::Template; # Minimum Test::More version; 0.94+ is required for `done_testing` BEGIN { unless (eval { require Test::More; "$Test::More::VERSION" >= 0.94; }) { Test::More::plan(skip_all => '[ Test::More v0.94+ ] is required for testing'); } Test::More->import; # Non-CORE module(s) unless (eval { require Test::Warnings; 1; }) { plan(skip_all => '[ Test::Warnings ] is required for testing'); } Test::Warnings->import; } my $template = <<'EOT'; {{ if ($good =~ /good/) { 'This template should not produce warnings.'.$bad; } }} EOT $template = Text::Template->new(type => 'STRING', source => $template); isa_ok $template, 'Text::Template'; my $result = $template->fill_in(HASH => { good => 'good' }); $result =~ s/(?:^\s+)|(?:\s+$)//gs; is $result, 'This template should not produce warnings.'; # see https://github.com/mschout/perl-text-template/issues/10 $template = Text::Template->new(type => 'STRING', package => 'MY', source => ''); $template->fill_in(package => 'MY', hash => { include => sub { 'XX' } }); $template = Text::Template->new(type => 'STRING', package => 'MY', source => ''); $template->fill_in(package => 'MY', hash => { include => sub { 'XX' } }); done_testing;