This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add test for change#4417
authorGurusamy Sarathy <gsar@cpan.org>
Wed, 20 Oct 1999 23:49:47 +0000 (23:49 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 20 Oct 1999 23:49:47 +0000 (23:49 +0000)
p4raw-link: @4417 on //depot/perl: 970c490586e0f01dd70401842b590223949989af

p4raw-id: //depot/perl@4418

t/op/sort.t

index f7bba3d..9abc410 100755 (executable)
@@ -163,7 +163,10 @@ print $@ ? "not ok 21\n# $@" : "ok 21\n";
 
 ## exercise sort builtins... ($a <=> $b already tested)
 @a = ( 5, 19, 1996, 255, 90 );
-@b = sort { $b <=> $a } @a;
+@b = sort {
+    my $dummy;         # force blockness
+    return $b <=> $a
+} @a;
 print ("@b" eq '1996 255 90 19 5' ? "ok 30\n" : "not ok 30\n");
 print "# x = '@b'\n";
 $x = join('', sort { $a cmp $b } @harry);