This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
integrate 5.8-maint: changes #18174 18187 18189-92 18202 18209 18214-5
[perl5.git] / t / op / grep.t
index d488527..6e60813 100755 (executable)
@@ -4,7 +4,7 @@
 # grep() and map() tests
 #
 
-print "1..32\n";
+print "1..33\n";
 
 $test = 1;
 
@@ -128,4 +128,10 @@ sub ok {
     print "# @x,$y\n";
     print "@x,$y" eq "3 4,1212" ? "ok $test\n" : "not ok $test\n";
     $test++;
+
+    # Add also a sample test from [perl #18153].  (The same bug).
+    $a = 1; map {if ($a){}} (2);
+    print "ok $test\n"; # no core dump is all we need
+    $test++;
 }
+