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

(-)a/t/db_dependent/Koha.t (-2 / +50 lines)
Lines 7-13 use strict; Link Here
7
use warnings;
7
use warnings;
8
use C4::Context;
8
use C4::Context;
9
9
10
use Test::More tests => 4;
10
use Test::More tests => 5;
11
use DateTime::Format::MySQL;
11
use DateTime::Format::MySQL;
12
12
13
eval {use Test::Deep;};
13
eval {use Test::Deep;};
Lines 62-67 subtest 'Authorized Values Tests' => sub { Link Here
62
        $sth->execute($data->{category}, $data->{authorised_value}, $data->{lib}, $data->{lib_opac}, $data->{imageurl});
62
        $sth->execute($data->{category}, $data->{authorised_value}, $data->{lib}, $data->{lib_opac}, $data->{imageurl});
63
    }
63
    }
64
};
64
};
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
65
### test for C4::Koha->GetDailyQuote()
80
### test for C4::Koha->GetDailyQuote()
66
SKIP:
81
SKIP:
67
    {
82
    {
Lines 109-111 SKIP: Link Here
109
            }
124
            }
110
        };
125
        };
111
}
126
}
112
- 
127
128
129
#
130
# test that &slashifyDate returns correct (non-US) date
131
#
132
subtest 'Date and ISBN tests' => sub {
133
    plan tests => 7;
134
135
    my $date    = "01/01/2002";
136
    my $newdate = &slashifyDate("2002-01-01");
137
    my $isbn13  = "9780330356473";
138
    my $isbn13D = "978-0-330-35647-3";
139
    my $isbn10  = "033035647X";
140
    my $isbn10D = "0-330-35647-X";
141
    ok( $date eq $newdate, 'slashifyDate' );
142
    my $undef = undef;
143
    is( xml_escape($undef), '',
144
        'xml_escape() returns empty string on undef input' );
145
    my $str = q{'"&<>'};
146
    is(
147
        xml_escape($str),
148
        '&apos;&quot;&amp;&lt;&gt;&apos;',
149
        'xml_escape() works as expected'
150
    );
151
    is( $str, q{'"&<>'}, '... and does not change input in place' );
152
    is( C4::Koha::_isbn_cleanup('0-590-35340-3'),
153
        '0590353403', '_isbn_cleanup removes hyphens' );
154
    is( C4::Koha::_isbn_cleanup('0590353403 (pbk.)'),
155
        '0590353403', '_isbn_cleanup removes parenthetical' );
156
    is( C4::Koha::_isbn_cleanup('978-0-321-49694-2'),
157
        '0321496949', '_isbn_cleanup converts ISBN-13 to ISBN-10' );
158
159
};
160

Return to bug 5327