X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fsort.t;h=27bc630a33cbc7e3a7c93fc40998d177a5f5c7ac;hb=2f52a3580b4a7ee9bec0aab0bca8b2c19859675d;hp=dc01e5f11ddd029ed81bb1e3b46fc0838aa83182;hpb=1ab872dad76f8ad01b881881eaac152a79eb3864;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/sort.t b/t/op/sort.t index dc01e5f..27bc630 100755 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -4,19 +4,22 @@ print "1..10\n"; -sub backwards { $a lt $b ? 1 : $a gt $b ? -1 : 0; } +sub backwards { $a lt $b ? 1 : $a gt $b ? -1 : 0 } @harry = ('dog','cat','x','Cain','Abel'); -@george = ('gone','chased','yz','Punished','Axed'); +@george = ('gone','chased','yz','punished','Axed'); $x = join('', sort @harry); print ($x eq 'AbelCaincatdogx' ? "ok 1\n" : "not ok 1\n"); +print "# x = '$x'\n"; $x = join('', sort( backwards @harry)); print ($x eq 'xdogcatCainAbel' ? "ok 2\n" : "not ok 2\n"); +print "# x = '$x'\n"; $x = join('', sort @george, 'to', @harry); -print ($x eq 'AbelAxedCainPunishedcatchaseddoggonetoxyz'?"ok 3\n":"not ok 3\n"); +print ($x eq 'AbelAxedCaincatchaseddoggonepunishedtoxyz'?"ok 3\n":"not ok 3\n"); +print "# x = '$x'\n"; @a = (); @b = reverse @a;