This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/uni/case.pl: Sort numerics with <=> to get better results
authorKarl Williamson <khw@cpan.org>
Sun, 29 Nov 2015 17:57:04 +0000 (10:57 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 6 Dec 2015 05:42:08 +0000 (22:42 -0700)
t/uni/case.pl

index d4bfc07..c3d5926 100644 (file)
@@ -82,7 +82,7 @@ sub casetest {
 
     my $test = $already_run + 1;
 
-    for my $ord (sort keys %simple) {
+    for my $ord (sort { $a <=> $b } keys %simple) {
        my $char = pack "W", $ord;
         my $disp_input = unidump($char);
 
@@ -96,7 +96,7 @@ sub casetest {
        }
     }
 
-    for my $ord (sort keys %spec) {
+    for my $ord (sort { $a <=> $b } keys %spec) {
        my $char = pack "W", $ord;
         my $disp_input = unidump($char);