new version of runperl()
[p5sagit/p5-mst-13.2.git] / t / io / open.t
index 635ea4c..9b37db3 100755 (executable)
@@ -11,7 +11,7 @@ use warnings;
 $Is_VMS = $^O eq 'VMS';
 $Is_Dos = $^O eq 'dos';
 
-print "1..66\n";
+print "1..70\n";
 
 my $test = 1;
 
@@ -289,3 +289,18 @@ ok;
     }
     ok;
 }
+
+# 67..70 - magic temporary file via 3 arg open with undef
+{
+    open(my $x,"+<",undef) or print "not ";
+    ok;
+    print "not " unless defined(fileno($x));
+    ok;
+    select $x;
+    ok;   # goes to $x
+    select STDOUT;
+    seek($x,0,0);
+    print <$x>;
+    print "not " unless tell($x) > 3;
+    ok;
+}