Crypt-Cracklib

 view release on metacpan or  search on metacpan

t/01use.t  view on Meta::CPAN

use Test::More tests => 22;

BEGIN { use_ok( 'Crypt::Cracklib' ); }

SKIP: {
    $username = getpwuid($<);
    skip "won't work unless username is longer", 1
    unless length($username) > 4;
    like(fascist_check($username.'1'), qr/username/, "username");
};

# it's WAY too short
like(fascist_check('bad'), qr/WAY/, "way too short");

# it is too short
ok(fascist_check('blah') eq 'it is too short', "too short");



( run in 0.280 second using v1.01-cache-2.11-cpan-8d75d55dd25 )