Convert all unimaginative (ie race condition) temporary file names to
[p5sagit/p5-mst-13.2.git] / t / io / print.t
index f33aa66..d29036b 100755 (executable)
@@ -6,9 +6,10 @@ BEGIN {
 }
 
 use strict 'vars';
-use Errno;
+eval 'use Errno';
+die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
 
-print "1..19\n";
+print "1..21\n";
 
 my $foo = 'STDOUT';
 print $foo "ok 1\n";
@@ -41,11 +42,26 @@ print @x,"14\nok",@y;
     print "";
 }
 
+$\ = '';
+
 if (!exists &Errno::EBADF) {
     print "ok 19 # skipped: no EBADF\n";
 } else {
     $! = 0;
+    no warnings 'unopened';
     print NONEXISTENT "foo";
     print "not " if ($! != &Errno::EBADF);
     print "ok 19\n";
 }
+
+{
+    # Change 26009: pp_print didn't extend the stack
+    #               before pushing its return value
+    # to make sure only that these obfuscated sentences will not crash.
+
+    map print(reverse), ('')x68;
+    print "ok 20\n";
+
+    map print(+()), ('')x68;
+    print "ok 21\n";
+}