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

(-)a/C4/Labels/Label.pm (+2 lines)
Lines 62-67 sub _check_params { Link Here
62
62
63
sub _guide_box {
63
sub _guide_box {
64
    my ( $llx, $lly, $width, $height ) = @_;
64
    my ( $llx, $lly, $width, $height ) = @_;
65
    return unless ( defined $llx and defined $lly and
66
                    defined $width and defined $height );
65
    my $obj_stream = "q\n";                            # save the graphic state
67
    my $obj_stream = "q\n";                            # save the graphic state
66
    $obj_stream .= "0.5 w\n";                          # border line width
68
    $obj_stream .= "0.5 w\n";                          # border line width
67
    $obj_stream .= "1.0 0.0 0.0  RG\n";                # border color red
69
    $obj_stream .= "1.0 0.0 0.0  RG\n";                # border color red
(-)a/t/Labels.t (-3 / +12 lines)
Lines 20-26 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use Test::More tests => 6;
23
use Test::More tests => 10;
24
24
25
BEGIN {
25
BEGIN {
26
    use_ok('C4::Labels::Label');
26
    use_ok('C4::Labels::Label');
Lines 36-42 is_deeply($parsed_fields, $expected_fields, '"callnumber" in label layout alias Link Here
36
36
37
is(C4::Labels::Label::_check_params(),"0",'test checking parameters');
37
is(C4::Labels::Label::_check_params(),"0",'test checking parameters');
38
38
39
ok(C4::Labels::Label::_guide_box(), 'test guide box with nothing entered');
39
my ($llx,$lly,$width,$height) = ( 0, 0, 10, 10 );
40
ok(!defined C4::Labels::Label::_guide_box(),
41
        "Test guide box with undefined parameters returns undef");
42
ok(!defined C4::Labels::Label::_guide_box(undef,$lly,$width,$height),
43
        "Test guide box with undefined 'x' coordinate returns undef");
44
ok(!defined C4::Labels::Label::_guide_box($llx,undef,$width,$height),
45
        "Test guide box with undefined 'y' coordinate returns undef");
46
ok(!defined C4::Labels::Label::_guide_box($llx,$lly,undef,$height),
47
        "Test guide box with undefined 'width' returns undef");
48
ok(!defined C4::Labels::Label::_guide_box($llx,$lly,$width,undef),
49
        "Test guide box with undefined 'height' returns undef");
40
50
41
ok(C4::Labels::Label::_get_text_fields(), 'test getting textx fields');
51
ok(C4::Labels::Label::_get_text_fields(), 'test getting textx fields');
42
52
43
- 

Return to bug 11402