cwd.t (was: Cwd has no tests?)
[p5sagit/p5-mst-13.2.git] / t / lib / io_scalar.t
1 #!./perl
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6     unless (defined &perlio::import) {
7         print "1..0 # Skip: not perlio\n";
8         exit 0;
9     }
10 }
11
12 $| = 1;
13 print "1..9\n";
14
15 my $fh;
16 my $var = "ok 2\n";
17 open($fh,"+<",\$var) or print "not ";
18 print "ok 1\n";
19 print <$fh>;
20 print "not " unless eof($fh);
21 print "ok 3\n";
22 seek($fh,0,0) or print "not ";
23 print "not " if eof($fh);
24 print "ok 4\n";
25 print "ok 5\n";
26 print $fh "ok 7\n" or print "not ";
27 print "ok 6\n";
28 print $var;
29 $var = "foo\nbar\n";
30 seek($fh,0,0) or print "not ";
31 print "not " if eof($fh);
32 print "ok 8\n";
33 print "not " unless <$fh> eq "foo\n";
34 print "ok 9\n";
35