4 BEGIN { $|= 1; print "1..10\n"; }
5 END { print "not ok 1\n" unless $main::loaded; }
9 use Win32API::File qw(:ALL);
18 my $fh = new Win32API::File "+> foo.txt"
19 or die fileLastError();
22 print "# tell \$fh == '$tell'\n";
27 my $text = "some text\n";
34 print "# after printing 'some text\\n', tell is: '$tell'\n";
36 $tell == length($text) + 1;
49 my $pretty_readline = $readline;
50 $pretty_readline =~ s/\r/\\r/g; $pretty_readline =~ s/\n/\\n/g;
51 print "# read line is '$pretty_readline'\n";
54 $readline eq "some text\r\n";
65 # Test out binmode (should be only LF with print, no CR).
67 $fh = new Win32API::File "+> foo.txt"
68 or die fileLastError();
70 print $fh "hello there\n";
74 <$fh> eq "hello there\n";