View | Details | Raw Unified | Return to bug 5327
Collapse All | Expand All

(-)a/t/ClassSortRoutine_Dewey.t (-2 / +15 lines)
Lines 6-14 Link Here
6
use strict;
6
use strict;
7
use warnings;
7
use warnings;
8
8
9
use Test::More tests => 1;
9
use Test::More tests => 6;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::ClassSortRoutine::Dewey');
12
        use_ok('C4::ClassSortRoutine::Dewey');
13
}
13
}
14
14
15
- 
15
my $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key(undef, undef );
16
is($cn_sort,"","testing whitespace");
17
18
$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("....",".....");
19
is($cn_sort,"","testing fullstops");
20
21
$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("123","456");
22
is($cn_sort,"123_456000000000000","testing numbers");
23
24
$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("abc123","456");
25
is($cn_sort,"ABC_123_456000000000000","testing alphanumeric");
26
27
$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("ab         c123","45   6");
28
is($cn_sort,"AB_C123_45_600000000000000","testing middle whitespace");

Return to bug 5327