X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDB.t;h=f665291fa2b07b58905ff005922c8fa413b5ff19;hb=ff504b36b0f6467f64b463fd17fb34f640855abc;hp=d5237a94fea00acf2d6da558b68681ddc8bc50bc;hpb=acc79e62856b17bbeea411d3411bafa1633a073a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/DB.t b/lib/DB.t index d5237a9..f665291 100644 --- a/lib/DB.t +++ b/lib/DB.t @@ -1,8 +1,13 @@ -#!./perl -w +#!./perl -Tw BEGIN { chdir 't' if -d 't'; @INC = '../lib'; + require Config; + if (($Config::Config{'extensions'} !~ m!\bList/Util\b!) ){ + print "1..0 # Skip -- Perl configured without List::Util module\n"; + exit 0; + } } # symbolic references used later @@ -79,8 +84,10 @@ BEGIN { } # test DB::_clientname() -is( DB::_clientname('foo=A(1)'), 'foo','DB::_clientname should return refname'); -is( DB::_clientname('bar'), '','DB::_clientname should not return non refname'); +is( DB::_clientname('foo=A(1)'), 'foo', + 'DB::_clientname should return refname'); +cmp_ok( DB::_clientname('bar'), 'eq', '', + 'DB::_clientname should not return non refname'); # test DB::next() and DB::step() {