Fixes discrepency between bibid and biblionumber. Thanks to Tomasz Wolniewicz for
[koha.git] / t / format.t
1 BEGIN { $| = 1; print "1..5\n"; }
2 END {print "not ok 1\n" unless $loaded;}
3 use C4::Format;
4 $loaded = 1;
5 print "ok 1\n";
6
7 #
8 # ensure &startint returns a reasonable value
9 #
10
11 # try right formatting
12 if ("  foo" eq fmtstr('','foo','R5')) {
13     print "ok 2\n";
14 } else {
15     print "not ok 2\n";
16 }
17
18 # try left formatting
19 if ("foo  " eq fmtstr('','foo','L5')) {
20     print "ok 3\n";
21 } else {
22     print "not ok 3\n";
23 }
24
25 # try centering with even spacing
26 if (" foo " eq fmtstr('','foo','C5')) {
27     print "ok 4\n";
28 } else {
29     print "not ok 4\n";
30 }
31
32 # try centering with uneven spacing
33 if ("foo " eq fmtstr('','foo','C4')) {
34     print "ok 5\n";
35 } else {
36     print "not ok 5\n";
37 }