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

(-)a/t/db_dependent/Record.t (-6 / +22 lines)
Lines 1-18 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
#
3
# This Koha test module is a stub!  
4
# Add more tests here!!!
5
2
6
use Modern::Perl;
3
use Modern::Perl;
7
4
8
use Test::More tests => 11;
5
use Test::More tests => 12;
9
use MARC::Record;
6
use MARC::Record;
10
7
8
use C4::Context;
9
11
BEGIN {
10
BEGIN {
12
        use_ok('C4::Record');
11
        use_ok('C4::Record');
13
}
12
}
14
13
15
#my ($marc,$to_flavour,$from_flavour,$encoding) = @_;
14
my $dbh = C4::Context->dbh;
15
# Start transaction
16
$dbh->{AutoCommit} = 0;
17
$dbh->{RaiseError} = 1;
18
19
C4::Context->set_preference( "BibtexExportAdditionalFields", q{} );
16
20
17
my @marcarray=marc2marc;
21
my @marcarray=marc2marc;
18
is ($marcarray[0],"Feature not yet implemented\n","error works");
22
is ($marcarray[0],"Feature not yet implemented\n","error works");
Lines 106-111 my $test5xml=qq(\@book{testID, Link Here
106
110
107
is ($bibtex, $test5xml, "testing bibtex");
111
is ($bibtex, $test5xml, "testing bibtex");
108
112
113
C4::Context->set_preference( "BibtexExportAdditionalFields", "'\@': 260\$b\ntest: 260\$b" );
114
$bibtex = marc2bibtex( $marc, 'testID' );
115
my $test6xml = qq(\@Scholastic{testID,
116
	author = {Rowling, J.K.},
117
	title = {Harry potter},
118
	publisher = {Scholastic},
119
	year = {2001},
120
	test = {Scholastic}
121
}
122
);
123
is( $bibtex, $test6xml, "testing bibtex" );
124
C4::Context->set_preference( "BibtexExportAdditionalFields", q{} );
125
109
$marc->append_fields(MARC::Field->new(
126
$marc->append_fields(MARC::Field->new(
110
    '264', '3', '1', b => 'Reprints', c => '2011'
127
    '264', '3', '1', b => 'Reprints', c => '2011'
111
));
128
));
112
- 

Return to bug 12357