win32_stat() fixes (2nd try)
[p5sagit/p5-mst-13.2.git] / t / comp / multiline.t
CommitLineData
8d063cd8 1#!./perl
2
79072805 3# $RCSfile: multiline.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:20 $
8d063cd8 4
5print "1..5\n";
6
7open(try,'>Comp.try') || (die "Can't open temp file.");
8
9$x = 'now is the time
10for all good men
11to come to.
12';
13
14$y = 'now is the time' . "\n" .
15'for all good men' . "\n" .
16'to come to.' . "\n";
17
18if ($x eq $y) {print "ok 1\n";} else {print "not ok 1\n";}
19
20print try $x;
21close try;
22
23open(try,'Comp.try') || (die "Can't reopen temp file.");
24$count = 0;
25$z = '';
26while (<try>) {
27 $z .= $_;
28 $count = $count + 1;
29}
30
31if ($z eq $y) {print "ok 2\n";} else {print "not ok 2\n";}
32
33if ($count == 3) {print "ok 3\n";} else {print "not ok 3\n";}
34
3fe9a6f1 35$_ = ($^O eq 'MSWin32') ? `type Comp.try` : `cat Comp.try`;
8d063cd8 36
37if (/.*\n.*\n.*\n$/) {print "ok 4\n";} else {print "not ok 4\n";}
bbad3607 38
39close(try) || (die "Can't close temp file.");
a0d0e21e 40unlink 'Comp.try' || `/bin/rm -f Comp.try`;
8d063cd8 41
42if ($_ eq $y) {print "ok 5\n";} else {print "not ok 5\n";}