projects
/
Biblio-Isis
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better logging, use Data::Dump if available [0.14]
[Biblio-Isis]
/
t
/
002_isis.t
diff --git
a/t/002_isis.t
b/t/002_isis.t
index
72f0398
..
c031d94
100755
(executable)
--- a/
t/002_isis.t
+++ b/
t/002_isis.t
@@
-3,12
+3,22
@@
use strict;
use blib;
use strict;
use blib;
-use Data::Dumper;
-
use Test::More tests => 110;
use File::Spec;
use Test::More tests => 110;
use File::Spec;
-BEGIN { use_ok( 'Biblio::Isis' ); }
+my $emulate_dump = 0;
+
+BEGIN {
+ use_ok( 'Biblio::Isis' );
+ eval "use Data::Dump";
+
+ if (! $@) {
+ *Dumper = *Data::Dump::dump;
+ } else {
+ use Data::Dumper;
+ }
+}
+
my $debug = shift @ARGV;
my $isis;
my $debug = shift @ARGV;
my $isis;
@@
-98,6
+108,9
@@
sub test_data {
} ];
foreach my $mfn (1 .. $isis->count) {
} ];
foreach my $mfn (1 .. $isis->count) {
+
+ diag "row: ",Dumper( $data->[$mfn-1] );
+
my $rec;
ok($rec = $isis->fetch($mfn), "fetch $mfn");
my $rec;
ok($rec = $isis->fetch($mfn), "fetch $mfn");
@@
-105,7
+118,7
@@
sub test_data {
my $i = 0;
foreach my $v (@{$data->[$mfn-1]->{$f}}) {
$v =~ s/^[01# ][01# ]// if ($args->{no_ident});
my $i = 0;
foreach my $v (@{$data->[$mfn-1]->{$f}}) {
$v =~ s/^[01# ][01# ]// if ($args->{no_ident});
- cmp_ok($v, '
==
', $rec->{$f}->[$i], "MFN $mfn $f:$i $v");
+ cmp_ok($v, '
eq
', $rec->{$f}->[$i], "MFN $mfn $f:$i $v");
$i++;
}
}
$i++;
}
}
@@
-132,7
+145,7
@@
$isis = Biblio::Isis->new (
debug => $debug,
);
debug => $debug,
);
-
print
Dumper($isis);
+
diag "isis-new result: ",
Dumper($isis);
test_data(
no_ident => 1,
test_data(
no_ident => 1,