Avoid a buffer overflow with threads and PERLIO_DEBUG
[p5sagit/p5-mst-13.2.git] / t / op / grep.t
index 4696224..3e5d716 100755 (executable)
@@ -4,7 +4,7 @@
 # grep() and map() tests
 #
 
-print "1..37\n";
+print "1..38\n";
 
 $test = 1;
 
@@ -162,3 +162,8 @@ sub ok {
     undef $gimme; map { gimme } @list;  ok($gimme, 'list');   $test++;
 }
 
+{
+    # This shouldn't loop indefinitively.
+    my @empty = map { while (1) {} } ();
+    ok("@empty", '');
+}