3 # This Koha test module is a stub!
4 # Add more tests here!!!
9 use Test
::More tests
=> 9;
12 use_ok
('C4::ClassSortRoutine::LCC');
16 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
(), "", "No arguments returns an empty string");
17 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
('a','b'), "A_B", "Arguments 'a','b' return 'A_B'");
20 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
(' ','b'), "B_", "Arguments ' ','b' return 'B_'");
21 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
('a',' '), "A_", "Arguments 'a',' ' return 'A_'");
22 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
(' ',' '), "", "Arguments ' ',' ' return ''");
24 #'funky cases' based on regex in code
25 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
('.','b'), "_B", "Arguments '.','b' return '_B'");
26 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
('....','........'), "_______", "Arguments '....','........' return '_______'");
27 is
(C4
::ClassSortRoutine
::LCC
::get_class_sort_key
('.','.'), "__", "Arguments '.','.' return '__'");