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 |
|
---|
6 | use Text::Template;
|
---|
7 |
|
---|
8 | die "This is the test program for Text::Template version 1.46.
|
---|
9 | You are using version $Text::Template::VERSION instead.
|
---|
10 | That does not make sense.\n
|
---|
11 | Aborting"
|
---|
12 | unless $Text::Template::VERSION == 1.46;
|
---|
13 |
|
---|
14 | print "1..2\n";
|
---|
15 |
|
---|
16 | $n=1;
|
---|
17 |
|
---|
18 | $template = new Text::Template TYPE => STRING, SOURCE => q{My process ID is {$$}};
|
---|
19 | $of = "t$$";
|
---|
20 | END { unlink $of }
|
---|
21 | open 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.
|
---|
26 | print +($text eq '1' ? '' : 'not '), "ok $n\n";
|
---|
27 | $n++;
|
---|
28 |
|
---|
29 | close O or die;
|
---|
30 | open I, "< $of" or die;
|
---|
31 | { local $/; $t = <I> }
|
---|
32 | close I;
|
---|
33 |
|
---|
34 | # (2) The text should have been printed to the file
|
---|
35 | print +($t eq "My process ID is $$" ? '' : 'not '), "ok $n\n";
|
---|
36 | $n++;
|
---|
37 |
|
---|
38 | exit;
|
---|
39 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.