diff options
Diffstat (limited to 't/op/sort.t')
-rw-r--r-- | t/op/sort.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/op/sort.t b/t/op/sort.t index 351a194e6f..88e07ea3cd 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -6,7 +6,7 @@ BEGIN { require 'test.pl'; } use warnings; -plan( tests => 151 ); +plan( tests => 153 ); # these shouldn't hang { @@ -843,3 +843,13 @@ is("@b", "1 2 3 3 4 5 7", "comparison result as string"); is("@sorted","1 2", 'overload sort result'); is($cs, 2, 'overload string called twice'); } + +fresh_perl_is('sub w ($$) {my ($l, my $r) = @_; my $v = \@_; undef @_; $l <=> $r}; print join q{ }, sort w 3, 1, 2, 0', + '0 1 2 3', + {stderr => 1, switches => ['-w']}, + 'RT #72334'); + +fresh_perl_is('sub w ($$) {my ($l, my $r) = @_; my $v = \@_; undef @_; @_ = 0..2; $l <=> $r}; print join q{ }, sort w 3, 1, 2, 0', + '0 1 2 3', + {stderr => 1, switches => ['-w']}, + 'RT #72334'); |