You can test that the generated password has the form you expect. Suppose you have read and chomped the wordlist into the keys of a hash, %words. Then the expression,
is true only if the password has the form you describe.$passwd =~ /^(\w+)\d{3}$/ and exists $words{$1}
After Compline,
Zaxo
In reply to Re: Unit Testing Non-Deterministic Behaviors
by Zaxo
in thread Unit Testing Non-Deterministic Behaviors
by friedo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |