don't quit if =head* wasn't found (suggested by Roland Bauer
[p5sagit/p5-mst-13.2.git] / t / io / open.t
1 #!./perl
2
3 # $RCSfile$    
4 $|  = 1;
5 $^W = 1;
6
7 print "1..9\n";   
8
9 # my $file tests
10
11 unlink("afile") if -f "afile";     
12 print "$!\nnot " unless open(my $f,"+>afile");
13 print "ok 1\n";
14 binmode $f;
15 print "not " unless -f "afile";     
16 print "ok 2\n";
17 print "not " unless print $f "SomeData\n";
18 print "ok 3\n";
19 print "not " unless tell($f) == 9;
20 print "ok 4\n";
21 print "not " unless seek($f,0,0);
22 print "ok 5\n";
23 $b = <$f>;
24 print "not " unless $b eq "SomeData\n";
25 print "ok 6\n";
26 print "not " unless -f $f;     
27 print "ok 7\n";
28 eval  { die "Message" };   
29 # warn $@;
30 print "not " unless $@ =~ /<\$f> line 1/;
31 print "ok 8\n";
32 print "not " unless close($f);
33 print "ok 9\n";
34 unlink("afile");     
35