summaryrefslogtreecommitdiffstats
path: root/external/perl/Text-Template-1.56/t/rt29928.t
diff options
context:
space:
mode:
Diffstat (limited to 'external/perl/Text-Template-1.56/t/rt29928.t')
-rwxr-xr-xexternal/perl/Text-Template-1.56/t/rt29928.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/external/perl/Text-Template-1.56/t/rt29928.t b/external/perl/Text-Template-1.56/t/rt29928.t
new file mode 100755
index 0000000000..b50d53ad42
--- /dev/null
+++ b/external/perl/Text-Template-1.56/t/rt29928.t
@@ -0,0 +1,26 @@
+#!perl
+#
+# Test for RT Bug 29928 fix
+# https://rt.cpan.org/Public/Bug/Display.html?id=29928
+
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+use_ok 'Text::Template::Preprocess' or exit 1;
+
+my $tin = q{The value of $foo is: {$foo}.};
+
+sub tester {
+ 1; # dummy preprocessor to cause the bug described.
+}
+
+my $tmpl1 = Text::Template::Preprocess->new(TYPE => 'STRING', SOURCE => $tin);
+
+$tmpl1->compile;
+
+my $t1 = $tmpl1->fill_in(
+ HASH => { foo => 'things' },
+ PREPROCESSOR => \&tester);
+
+is $t1, 'The value of $foo is: things.';