From: Rafael Garcia-Suarez Date: Mon, 7 Dec 2009 14:03:48 +0000 (+0100) Subject: Fix a test that wasn’t testing was it purported to be testing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f4622ecb46636e776e5a134c72847bbb795126c;p=p5sagit%2Fp5-mst-13.2.git Fix a test that wasn’t testing was it purported to be testing (noticed by Father Chrysostomos, further modified to avoid using too much overloaded names like foo and Foo.) --- diff --git a/t/op/sort.t b/t/op/sort.t index 24e1713..6261f22 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -777,13 +777,13 @@ cmp_ok($answer,'eq','good','sort subr called from other package'); # Sorting shouldn't increase the refcount of a sub { - sub foo {(1+$a) <=> (1+$b)} - my $refcnt = &Internals::SvREFCNT(\&foo); - @output = sort foo 3,7,9; + sub sportello {(1+$a) <=> (1+$b)} + my $refcnt = &Internals::SvREFCNT(\&sportello); + @output = sort sportello 3,7,9; { - package Foo; - ::is($refcnt, &Internals::SvREFCNT(\&foo), "sort sub refcnt"); + package Doc; + ::is($refcnt, &Internals::SvREFCNT(\&::sportello), "sort sub refcnt"); $fail_msg = q(Modification of a read-only value attempted); # Sorting a read-only array in-place shouldn't be allowed my @readonly = (1..10);