Change 28404 broke the construct s/foo/<<BAR/e. So, try to be more
[p5sagit/p5-mst-13.2.git] / t / op / do.t
index 744a62b..9775331 100755 (executable)
--- a/t/op/do.t
+++ b/t/op/do.t
@@ -1,7 +1,5 @@
 #!./perl
 
-# $RCSfile: do.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:45 $
-
 sub foo1
 {
     ok($_[0]);
@@ -31,7 +29,7 @@ sub ok {
     return $ok;
 }
 
-print "1..20\n";
+print "1..22\n";
 
 # Test do &sub and proper @_ handling.
 $_[0] = 0;
@@ -87,6 +85,13 @@ ok( !$@, "do on a non-existing file, first try" );
 eval qq{ do uc qq(a file that does not exist); };
 ok( !$@, "do on a non-existing file, second try"  );
 
+# 6 must be interpreted as a file name here
+ok( (!defined do 6) && $!, "'do 6' : $!" );
+
+# [perl #19545]
+push @t, ($u = (do {} . "This should be pushed."));
+ok( $#t == 0, "empty do result value" );
+
 END {
     1 while unlink("$$.16", "$$.17", "$$.18");
 }