Enache Adrian <enache@rdslink.ro> test for Win32 sysread/O_TEXT issue.
authorNick Ing-Simmons <nik@tiuk.ti.com>
Sat, 17 May 2003 15:37:45 +0000 (15:37 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Sat, 17 May 2003 15:37:45 +0000 (15:37 +0000)
p4raw-id: //depot/perlio@19544

t/op/sysio.t

index 473a3f0..61a5c0a 100755 (executable)
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..39\n";
+print "1..40\n";
 
 chdir('op') || chdir('t/op') || die "sysio.t: cannot look for myself: $!";
 
@@ -211,6 +211,18 @@ print "ok 39\n";
 
 close(I);
 
+{
+    use Fcntl qw(O_RDONLY O_TEXT);
+    open I, ">$outfile";
+    print I "a\nb\nc";
+    close I;
+    sysopen I, $outfile, O_RDONLY|O_TEXT; 
+    sysread I, $buf, 7;
+    print "not " if $buf ne "a\nb\nc";
+    print "ok 40 - sysopen with O_TEXT\n";
+    close I;
+}
+
 unlink $outfile;
 
 chdir('..');