|
Lines 1-32
Link Here
|
|
|
1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
# This file is part of Koha. |
| 4 |
# |
| 5 |
# Koha is free software; you can redistribute it and/or modify it |
| 6 |
# under the terms of the GNU General Public License as published by |
| 7 |
# the Free Software Foundation; either version 3 of the License, or |
| 8 |
# (at your option) any later version. |
| 9 |
# |
| 10 |
# Koha is distributed in the hope that it will be useful, but |
| 11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
# GNU General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU General Public License |
| 16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 17 |
|
| 1 |
use Modern::Perl; |
18 |
use Modern::Perl; |
|
|
19 |
|
| 2 |
use Test::More tests => 3; |
20 |
use Test::More tests => 3; |
|
|
21 |
use t::lib::TestBuilder; |
| 22 |
|
| 3 |
use MARC::Record; |
23 |
use MARC::Record; |
| 4 |
use MARC::File::USMARC; |
24 |
use MARC::File::USMARC; |
| 5 |
use MARC::File::XML;# ( BinaryEncoding => 'utf-8' ); |
25 |
use MARC::File::XML; |
| 6 |
#use XML::Simple; |
|
|
| 7 |
use MARC::Batch; |
26 |
use MARC::Batch; |
| 8 |
use t::lib::TestBuilder; |
|
|
| 9 |
use File::Slurp; |
27 |
use File::Slurp; |
| 10 |
#use utf8; |
|
|
| 11 |
use Encode; |
28 |
use Encode; |
| 12 |
|
29 |
|
| 13 |
use C4::Biblio; |
30 |
use C4::Biblio; |
| 14 |
use C4::Context; |
31 |
use C4::Context; |
| 15 |
|
32 |
use Koha::Database; |
| 16 |
use Koha::Exporter::Record; |
33 |
use Koha::Exporter::Record; |
| 17 |
|
34 |
|
| 18 |
my $dbh = C4::Context->dbh; |
35 |
my $schema = Koha::Database->new->schema; |
| 19 |
#$dbh->{AutoCommit} = 0; |
36 |
$schema->storage->txn_begin; |
| 20 |
#$dbh->{RaiseError} = 1; |
|
|
| 21 |
|
37 |
|
| 22 |
#$dbh->do(q|DELETE FROM issues|); |
38 |
my $dbh = C4::Context->dbh; |
| 23 |
#$dbh->do(q|DELETE FROM reserves|); |
|
|
| 24 |
#$dbh->do(q|DELETE FROM items|); |
| 25 |
#$dbh->do(q|DELETE FROM biblio|); |
| 26 |
#$dbh->do(q|DELETE FROM auth_header|); |
| 27 |
|
39 |
|
| 28 |
my $biblio_1_title = 'Silence in the library'; |
40 |
my $biblio_1_title = 'Silence in the library'; |
| 29 |
#my $biblio_2_title = Encode::encode('UTF-8', 'The art of computer programming ກ ຂ ຄ ງ ຈ ຊ ຍ é'); |
|
|
| 30 |
my $biblio_2_title = 'The art of computer programming ກ ຂ ຄ ງ ຈ ຊ ຍ é'; |
41 |
my $biblio_2_title = 'The art of computer programming ກ ຂ ຄ ງ ຈ ຊ ຍ é'; |
| 31 |
my $biblio_1 = MARC::Record->new(); |
42 |
my $biblio_1 = MARC::Record->new(); |
| 32 |
$biblio_1->leader('00266nam a22001097a 4500'); |
43 |
$biblio_1->leader('00266nam a22001097a 4500'); |
|
Lines 164-166
subtest 'export iso2709' => sub {
Link Here
|
| 164 |
$title = Encode::encode('UTF-8', $title); |
175 |
$title = Encode::encode('UTF-8', $title); |
| 165 |
is( $title, $biblio_2_title, 'Export ISO2709: The title is correctly encoded' ); |
176 |
is( $title, $biblio_2_title, 'Export ISO2709: The title is correctly encoded' ); |
| 166 |
}; |
177 |
}; |
|
|
178 |
|
| 179 |
$schema->storage->txn_rollback; |
| 180 |
|
| 181 |
1; |
| 182 |
|