Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/t/io/read.t

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!./perl

# $RCSfile$

print "1..1\n";

open(A,"+>a");
print A "_";
seek(A,0,0);

$b = "abcd"; 
$b = "";

read(A,$b,1,4);

close(A);

unlink("a");

if ($b eq "\000\000\000\000_") {
	print "ok 1\n";
} else { # Probably "\000bcd_"
	print "not ok 1\n";
}

unlink 'a';

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.