VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.7/external/perl/Text-Template-1.56/t/rt29928.t@ 100620

Last change on this file since 100620 was 94320, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

File size: 553 bytes
Line 
1#!perl
2#
3# Test for RT Bug 29928 fix
4# https://rt.cpan.org/Public/Bug/Display.html?id=29928
5
6use strict;
7use warnings;
8use Test::More tests => 2;
9
10use_ok 'Text::Template::Preprocess' or exit 1;
11
12my $tin = q{The value of $foo is: {$foo}.};
13
14sub tester {
15 1; # dummy preprocessor to cause the bug described.
16}
17
18my $tmpl1 = Text::Template::Preprocess->new(TYPE => 'STRING', SOURCE => $tin);
19
20$tmpl1->compile;
21
22my $t1 = $tmpl1->fill_in(
23 HASH => { foo => 'things' },
24 PREPROCESSOR => \&tester);
25
26is $t1, 'The value of $foo is: things.';
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette