--- trunk/t/002_isis.t 2005/01/01 22:29:35 27 +++ trunk/t/002_isis.t 2005/01/01 22:29:49 28 @@ -5,7 +5,7 @@ use Data::Dumper; -use Test::More tests => 108; +use Test::More tests => 110; BEGIN { use_ok( 'IsisDB' ); } @@ -24,7 +24,9 @@ SKIP: { skip "no CNT file for this database", 5 unless $isis->{cnt_file}; - $isis->read_cnt; + ok(my $isis_cnt = $isis->read_cnt, "read_cnt"); + + cmp_ok(scalar keys %{$isis_cnt}, '==', 2, "returns 2 elements"); my $cnt = { '1' => { @@ -53,7 +55,7 @@ foreach my $c (keys %{$cnt}) { foreach my $kn (keys %{$cnt->{$c}}) { - cmp_ok($isis->{cnt}->{$c}->{$kn}, '==', $cnt->{$c}->{$kn}, "cnt $c $kn same"); + cmp_ok($isis_cnt->{$c}->{$kn}, '==', $cnt->{$c}->{$kn}, "cnt $c $kn same"); } } }