new version of runperl()
[p5sagit/p5-mst-13.2.git] / t / io / open.t
index 1b54c33..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;
 
@@ -138,7 +138,7 @@ open my $f, '<&', 'afile';
 1;
 EOE
 ok;
-$@ =~ /Bad filehandle:\s+afile/ or print "not ($@)";
+$@ =~ /Bad filehandle:\s+afile/ or print "not ";
 ok;
 
 # local $file tests
@@ -262,7 +262,7 @@ open local $f, '<&', 'afile';
 1;
 EOE
 ok;
-$@ =~ /Bad filehandle:\s+afile/ or print "not ($@) ";
+$@ =~ /Bad filehandle:\s+afile/ or print "not ";
 ok;
 
 # 65..66
@@ -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;
+}