3 # test apparatus for Text::Template module
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
12 unless $Text::Template::VERSION == 1.46;
18 $template = new Text::Template TYPE => STRING, SOURCE => q{My process ID is {$$}};
21 open O, "> $of" or die;
23 $text = $template->fill_in(OUTPUT => \*O);
25 # (1) No $text should have been constructed. Return value should be true.
26 print +($text eq '1' ? '' : 'not '), "ok $n\n";
30 open I, "< $of" or die;
31 { local $/; $t = <I> }
34 # (2) The text should have been printed to the file
35 print +($t eq "My process ID is $$" ? '' : 'not '), "ok $n\n";