From: Vincent Pit Date: Thu, 12 Mar 2009 00:37:13 +0000 (+0100) Subject: Test the right amount of keys in t/20-extended.t X-Git-Tag: v0.12~10 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=5820061acfe58039dc4a9c4f28e3ffd90f5a8570;p=perl%2Fmodules%2FLinux-SysInfo.git Test the right amount of keys in t/20-extended.t --- diff --git a/t/20-extended.t b/t/20-extended.t index 6cbb353..8876414 100644 --- a/t/20-extended.t +++ b/t/20-extended.t @@ -10,14 +10,15 @@ use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/; unless (LS_HAS_EXTENDED) { plan skip_all => 'your kernel does not support extended sysinfo fields'; } else { - plan tests => 4 * 5; + plan tests => 5 * 5; SKIP: { for my $run (0 .. 4) { my $si = sysinfo; - skip 'system error (sysinfo returned undef)' => (5 - $run) * 4 + skip 'system error (sysinfo returned undef)' => (5 - $run) * 5 unless defined $si; is ref($si), 'HASH', "sysinfo returns a hash reference at run $run"; + is scalar(keys %$si), 14, "sysinfo object has the right number of keys at run $run"; for (qw/totalhigh freehigh mem_unit/) { if (defined $si->{$_}) {