projects
/
MARC-Fast
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
much more sane implementation of to_hash which now include
[MARC-Fast]
/
t
/
001_marc.t
diff --git
a/t/001_marc.t
b/t/001_marc.t
index
5090234
..
c05fcd6
100755
(executable)
--- a/
t/001_marc.t
+++ b/
t/001_marc.t
@@
-3,7
+3,7
@@
use strict;
use blib;
use strict;
use blib;
-use Test::More tests =>
5
3;
+use Test::More tests =>
6
3;
use Test::Exception;
BEGIN {
use Test::Exception;
BEGIN {
@@
-50,16
+50,20
@@
SKIP: {
ok(! $marc->fetch($marc->count + 1), "fetch max+1:".($marc->count+1));
foreach (1 .. 10) {
ok(! $marc->fetch($marc->count + 1), "fetch max+1:".($marc->count+1));
foreach (1 .. 10) {
- ok($marc->fetch($_), "fetch
$_
");
+ ok($marc->fetch($_), "fetch
($_)
");
ok($marc->last_leader, "last_leader $_");
ok($marc->last_leader, "last_leader $_");
- ok(my $hash = $marc->to_hash($_), "to_hash
$_
");
+ ok(my $hash = $marc->to_hash($_), "to_hash
($_)
");
diag "to_hash($_) = ",Data::Dump::dump($hash) if ($debug);
diag "to_hash($_) = ",Data::Dump::dump($hash) if ($debug);
- ok(my $ascii = $marc->to_ascii($_), "to_ascii $_");
+
+ ok(my $hash_sf = $marc->to_hash($_, include_subfields => 1), "to_hash($_,include_subfields)");
+ diag "to_hash($_, include_subfields => 1) = ",Data::Dump::dump($hash_sf) if ($debug);
+
+ ok(my $ascii = $marc->to_ascii($_), "to_ascii($_)");
diag "to_ascii($_) ::\n$ascii" if ($debug);
}
diag "to_ascii($_) ::\n$ascii" if ($debug);
}
- ok(! $marc->fetch(0), "fetch
0
again");
+ ok(! $marc->fetch(0), "fetch
(0)
again");
ok(! $marc->last_leader, "no last_leader");
}
ok(! $marc->last_leader, "no last_leader");
}