BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
- unless (defined &perlio::import) {
+ unless (exists $open::layers{'perlio'}) {
print "1..0 # Skip: not perlio\n";
exit 0;
}
}
$| = 1;
-print "1..9\n";
+print "1..10\n";
my $fh;
my $var = "ok 2\n";
print "ok 8\n";
print "not " unless <$fh> eq "foo\n";
print "ok 9\n";
-
+# Test multiple consecutive writes to $var
+$var = "";
+seek($fh, 0, 0);
+print $fh "Fred and Wilma ";
+print $fh "Flintstone";
+print "not " unless $var eq "Fred and Wilma Flintstone";
+print "ok 10\n";