Authen-Krb5-Simple
view release on metacpan or search on metacpan
$errstr = $krb->errstr();
ok(!$ret, "Return value 'true' check: Got '$ret'");
ok($errcode != 0, "Non-zero error code check: Got '$errcode'");
ok($errstr ne '', "Non-empty error string check: Got '$errstr'");
}
# (8-13) Null and Empty password
#
$ret = $krb->authenticate('_not_a_user_');
ok($ret==0, "Null password returns 0 check: Got '$ret'");
$errcode = $krb->errcode();
$errstr = $krb->errstr();
ok($errcode eq 'e1', "Null password error code of 'e1' check: Got '$errcode'");
ok($errstr =~ /Null or empty password not supported/,
"Null password error string check: Got '$errstr'");
$ret = $krb->authenticate('_not_a_user_', '');
ok($ret==0, "Empty password should return 0: Got '$ret'");
$errcode = $krb->errcode();
$errstr = $krb->errstr();
ok($errcode eq 'e1', "Empty password error code of 'e1' check: Got '$errcode'");
ok($errstr =~ /Null or empty password not supported/,
"Null password error string check: Got '$errstr'");
# (14) Bad user and pw
( run in 0.309 second using v1.01-cache-2.11-cpan-0a987023a57 )