5 my $CAT = ($^O eq 'MSWin32') ? 'type' : 'cat';
19 now @<<the@>>>> for all@|||||men to come @<<<<
21 'i' . 's', "time\n", $good, 'to'
25 open(OUT, '>Op_write.tmp') || die "Can't create Op_write.tmp";
29 $multiline = "forescore\nand\nseven years\n";
30 $foo = 'when in the course of human events it becomes necessary';
43 now is the time for all good men to come to\n";
45 if (`$CAT Op_write.tmp` eq $right)
46 { print "ok 1\n"; 1 while unlink 'Op_write.tmp'; }
48 { print "not ok 1\n"; }
51 my $fox = 'foxiness'; # Test a lexical variable.
61 now @<<the@>>>> for all@|||||men to come @<<<<
62 'i' . 's', "time\n", $good, 'to'
65 open OUT2, '>Op_write.tmp' or die "Can't create Op_write.tmp";
68 $multiline = "forescore\nand\nseven years\n";
69 $foo = 'when in the course of human events it becomes necessary';
85 now is the time for all good men to come to\n";
87 if (`$CAT Op_write.tmp` eq $right)
88 { print "ok 2\n"; 1 while unlink 'Op_write.tmp'; }
90 { print "not ok 2\n"; }
102 now @<<the@>>>> for all@|||||men to come @<<<<
103 'i' . 's', "time\n", $good, 'to'
107 open(OUT2, '>Op_write.tmp') || die "Can't create Op_write.tmp";
111 $multiline = "forescore\nand\nseven years\n";
112 $foo = 'when in the course of human events it becomes necessary';
129 now is the time for all good men to come to\n";
131 if (`$CAT Op_write.tmp` eq $right)
132 { print "ok 3\n"; 1 while unlink 'Op_write.tmp'; }
134 { print "not ok 3\n"; }
156 my $format1 = '@' . '>' x $_;
157 formline $format1, 'abc';
158 $was1 .= "$format1 $^A\n";
161 local $format2 = '@' . '>' x $_;
162 formline $format2, 'abc';
163 $was2 .= "$format2 $^A\n";
165 print $was1 eq $mustbe ? "ok 4\n" : "not ok 4\n";
166 print $was2 eq $mustbe ? "ok 5\n" : "not ok 5\n";
177 open(OUT3, '>Op_write.tmp') || die "Can't create Op_write.tmp";
186 if (`$CAT Op_write.tmp` eq $right)
187 { print "ok 6\n"; 1 while unlink 'Op_write.tmp'; }
189 { print "not ok 6\n"; }
191 # test lexicals and globals
199 open(LEX, ">&STDOUT") or die;
205 # LEX_INTERPNORMAL test
211 open OUT4, ">Op_write.tmp" or die "Can't create Op_write.tmp";
214 if (`$CAT Op_write.tmp` eq "1\n") {
216 1 while unlink "Op_write.tmp";
229 open(OUT10, '>Op_write.tmp') || die "Can't create Op_write.tmp";
235 $right = " 12.95 00012.95\n";
236 if (`$CAT Op_write.tmp` eq $right)
237 { print "ok 10\n"; 1 while unlink 'Op_write.tmp'; }
239 { print "not ok 10\n"; }
252 open(OUT11, '>Op_write.tmp') || die "Can't create Op_write.tmp";
262 if (`$CAT Op_write.tmp` eq $right)
263 { print "ok 11\n"; 1 while unlink 'Op_write.tmp'; }
265 { print "not ok 11\n"; }