+++: non-alpha first
[perl/list-index.git] / t / 10-ranges.t
index 2b197e8c38ee85e6b88c3f371b5adbf499f8a9de..eaae0e993483293b41abefdc6e28dcc70fe2a686 100644 (file)
@@ -1,7 +1,6 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use utf8;
 
 use Test::More tests => 16;
 use Test::NoWarnings;
@@ -24,25 +23,25 @@ is_deeply($index->ranges({pagesize => @uniform / 2.1}), [map { [split /-/, $_, 2
 }
 
 {
-ok(my $index = List::Index->new(['aa'..'zz', 1..145]), 'non-alphabetic values (uniform)');
+ok(my $index = List::Index->new(['aa'..'zz', 1..193]), 'non-alphabetic values (uniform)');
 is_deeply($index->ranges, [map { [split /-/, $_, 2] } qw(
-       a-bv bw-dr ds-fn fo-hk hl-jg jh-k l-m n-ov ow-qr qs-sn so-uk ul-wg wh-x
-       y-z .-.z ..-.z ..-..z ...-
+       .-.a ..-.a ..-..a ...-
+       a-bv bw-dr ds-fn fo-hk hl-jg jh-k l-m n-ov ow-qr qs-sn so-uk ul-wg wh-x y-
 )], 'default ranges');
 is_deeply($index->ranges({pagesize => 300}), [map { [split /-/, $_, 2] } qw(
-       a-j k-u v-
+       .-c d-ov ow-
 )], 'large pagesize');
 }
 
 {
 ok(my $index = List::Index->new([qw(
-       baaa baa1  baa2 baa3  bbc cbc  daaa ea  eaaa zed
+       baa1 baa2  baa3 baaa  bbc cbc  daaa ea  eaaa zed
 )]), 'variable length values');
 is_deeply($index->ranges({pagesize => 2, context => 0}), [
-       map { [split /-/, $_, 2] } qw(baaa-baaz baa.-bbb bbc-daa daaa-eaa eaaa-)
+       map { [split /-/, $_, 2] } qw(baa.-baaa baa.-bbb bbc-daa daaa-eaa eaaa-)
 ], 'no context');
 is_deeply($index->ranges({pagesize => 2}), [
-       map { [split /-/, $_, 2] } qw(b-baaz baa.-ba bb-c d-ea eaa-)
+       map { [split /-/, $_, 2] } qw(b-baaa baa.-ba bb-c d-ea eaa-)
 ], 'default context');  # context should be 1
 is_deeply($index->ranges({pagesize => 2, context => 2}), [
        map { [split /-/, $_, 2] } qw(b-a b-ba bb-c d-d e-)