1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
use strict; |
use strict; |
4 |
use Test::More tests => 51; |
use Test::More tests => 55; |
5 |
use Test::Exception; |
use Test::Exception; |
6 |
use blib; |
use blib; |
7 |
|
|
112 |
} |
} |
113 |
} |
} |
114 |
|
|
115 |
|
$config_path = "$abs_path/conf/marc.yml"; |
116 |
|
|
117 |
|
ok(-e $config_path, "$config_path exists"); |
118 |
|
|
119 |
|
ok( |
120 |
|
my $parser = new WebPAC::Parser( |
121 |
|
config => new WebPAC::Config( path => $config_path ), |
122 |
|
base_path => $abs_path, |
123 |
|
debug => $debug, |
124 |
|
), "new"); |
125 |
|
|
126 |
|
ok(my $marc = $parser->generate_marc('marc','marc-input'), 'generate_marc'); |
127 |
|
|
128 |
|
diag "marc: ",dump($marc) if ($debug); |
129 |
|
|
130 |
|
is_deeply($marc, { |
131 |
|
marc => 1, |
132 |
|
marc_compose => 1, |
133 |
|
marc_duplicate => 1, |
134 |
|
marc_indicators => 1, |
135 |
|
marc_leader => 1, |
136 |
|
marc_original_order => 1, |
137 |
|
marc_remove => 1, |
138 |
|
marc_repeatable_subfield => 1, |
139 |
|
}, 'catched all marc_*'); |
140 |
|
|