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

(-)a/t/ClassSortRoutine_LCC.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 => 9;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::ClassSortRoutine::LCC');
12
        use_ok('C4::ClassSortRoutine::LCC');
13
}
13
}
14
14
15
- 
15
#Obvious cases
16
is(C4::ClassSortRoutine::LCC::get_class_sort_key(), "", "No arguements returns an empty string");
17
is(C4::ClassSortRoutine::LCC::get_class_sort_key('a','b'), "A_B", "Arguements 'a','b' return 'A_B'");
18
19
#spaces in arguements 
20
is(C4::ClassSortRoutine::LCC::get_class_sort_key(' ','b'), "B_", "Arguements ' ','b' return 'B_'");
21
is(C4::ClassSortRoutine::LCC::get_class_sort_key('a',' '), "A_", "Arguements 'a',' ' return 'A_'");
22
is(C4::ClassSortRoutine::LCC::get_class_sort_key(' ','    '), "", "Arguements ' ','    ' return ''");
23
24
#'funky cases' based on regex in code
25
is(C4::ClassSortRoutine::LCC::get_class_sort_key('.','b'), "_B", "Arguements '.','b' return '_B'");
26
is(C4::ClassSortRoutine::LCC::get_class_sort_key('....','........'), "_______", "Arguements '....','........' return '_______'");
27
is(C4::ClassSortRoutine::LCC::get_class_sort_key('.','.'), "__", "Arguements '.','.' return '__'");
28

Return to bug 5327