2013-02-07 17:26:39 -08:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2014-09-27 06:42:57 -07:00
|
|
|
zci answer_type => 'random_passphrase';
|
2014-02-07 17:13:07 -08:00
|
|
|
zci is_cached => 0;
|
2013-02-07 17:26:39 -08:00
|
|
|
|
|
|
|
ddg_goodie_test(
|
2014-02-07 17:13:07 -08:00
|
|
|
[qw( DDG::Goodie::Passphrase )],
|
2014-02-09 22:24:25 -08:00
|
|
|
'random passphrase 1 word' => test_zci(qr/random passphrase:(?:\s[a-z]+)/),
|
|
|
|
'passphrase 1 word' => test_zci(qr/random passphrase:(?:\s[a-z]+)/),
|
|
|
|
'passphrase 2 random word' => test_zci(qr/random passphrase:(?:\s[a-z]+){2}/),
|
|
|
|
'passphrase 2 word' => test_zci(qr/random passphrase:(?:\s[a-z]+){2}/),
|
|
|
|
'passphrase 3 words random' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'pass phrase 3 random words' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'pass phrase 3 words random' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'3 word passphrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'3 word pass phrase random' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'4 word random passphrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){4}/),
|
|
|
|
'generate 4 word random passphrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){4}/),
|
|
|
|
'10 word passphrase random' => test_zci(qr/random passphrase:(?:\s[a-z]+){10}/),
|
|
|
|
'random passphrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){4}/),
|
|
|
|
'create random passphrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){4}/),
|
|
|
|
'3 random words passphrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'random 3 word pass phrase' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'pass phrase 3 words' => test_zci(qr/random passphrase:(?:\s[a-z]+){3}/),
|
|
|
|
'pass phrase 0 words' => undef,
|
|
|
|
'passphrase 11 words' => undef,
|
|
|
|
'passphrase 3' => undef,
|
|
|
|
'passphrase' => undef,
|
|
|
|
'pass phrase 3 chars' => undef,
|
|
|
|
'random generate 3 word passphrase' => undef,
|
2013-02-07 17:26:39 -08:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|