File Coverage

File:t/ClassSortRoutine_LCC.t
Coverage:100.0%

linestmtbrancondsubtimecode
1#!/usr/bin/perl
2#
3# This Koha test module is a stub!
4# Add more tests here!!!
5
6
1
1
1
1.3328352247023e+15
2
23
use strict;
7
1
1
1
4
2
33
use warnings;
8
9
1
1
1
541
20027
12
use Test::More tests => 9;
10
11BEGIN {
12
1
1510
        use_ok('C4::ClassSortRoutine::LCC');
13}
14
15#Obvious cases
16
1
190207
is(C4::ClassSortRoutine::LCC::get_class_sort_key(), "", "No arguments returns an empty string");
17
1
863
is(C4::ClassSortRoutine::LCC::get_class_sort_key('a','b'), "A_B", "Arguments 'a','b' return 'A_B'");
18
19#spaces in arguements
20
1
723
is(C4::ClassSortRoutine::LCC::get_class_sort_key(' ','b'), "B_", "Arguments ' ','b' return 'B_'");
21
1
488
is(C4::ClassSortRoutine::LCC::get_class_sort_key('a',' '), "A_", "Arguments 'a',' ' return 'A_'");
22
1
571
is(C4::ClassSortRoutine::LCC::get_class_sort_key(' ',' '), "", "Arguments ' ',' ' return ''");
23
24#'funky cases' based on regex in code
25
1
732
is(C4::ClassSortRoutine::LCC::get_class_sort_key('.','b'), "_B", "Arguments '.','b' return '_B'");
26
1
577
is(C4::ClassSortRoutine::LCC::get_class_sort_key('....','........'), "_______", "Arguments '....','........' return '_______'");
27
1
552
is(C4::ClassSortRoutine::LCC::get_class_sort_key('.','.'), "__", "Arguments '.','.' return '__'");