[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

[PATCH] lib/DB.t fix



lib/DB.t is now complaining after the upgrade to Test::Simple:

lib/DB........................................................Use of
uninitialized value $got in string eq at ../lib/DB.t line 89.
ok

The function call being tested is (properly) returning 'undef', so
using cmp_ok() to test against the empty string is incorrect.

The attached patch fixes this.
--- perl-current/lib/DB.t
+++ perl-current/lib/DB.t
@@ -86,7 +86,7 @@
 # test DB::_clientname()
 is( DB::_clientname('foo=A(1)'), 'foo',
     'DB::_clientname should return refname');
-cmp_ok( DB::_clientname('bar'), 'eq', '',
+ok(! defined(DB::_clientname('bar')),
         'DB::_clientname should not return non refname');
 
 # test DB::next() and DB::step()

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]