VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1k/external/perl/Text-Template-1.46/t/06-ofh.t@ 90293

Last change on this file since 90293 was 90293, checked in by vboxsync, 4 years ago

openssl-1.1.1k: Applied and adjusted our OpenSSL changes to 1.1.1k. bugref:10072

File size: 835 bytes
Line 
1#!perl
2#
3# test apparatus for Text::Template module
4# still incomplete.
5
6use Text::Template;
7
8die "This is the test program for Text::Template version 1.46.
9You are using version $Text::Template::VERSION instead.
10That does not make sense.\n
11Aborting"
12 unless $Text::Template::VERSION == 1.46;
13
14print "1..2\n";
15
16$n=1;
17
18$template = new Text::Template TYPE => STRING, SOURCE => q{My process ID is {$$}};
19$of = "t$$";
20END { unlink $of }
21open O, "> $of" or die;
22
23$text = $template->fill_in(OUTPUT => \*O);
24
25# (1) No $text should have been constructed. Return value should be true.
26print +($text eq '1' ? '' : 'not '), "ok $n\n";
27$n++;
28
29close O or die;
30open I, "< $of" or die;
31{ local $/; $t = <I> }
32close I;
33
34# (2) The text should have been printed to the file
35print +($t eq "My process ID is $$" ? '' : 'not '), "ok $n\n";
36$n++;
37
38exit;
39
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