File: 02-word.t

package info (click to toggle)
libcrypt-generatepassword-perl 0.04-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,100 kB
  • ctags: 15
  • sloc: perl: 280; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!perl

use 5.006;
use strict;
use warnings;

my $min = 8;
my $max = 12;

use Test::More 0.88 tests => 10;
use Crypt::GeneratePassword qw/ word /;

for (1 .. 10) {
    my $word = word($min, $max);
    ok(length($word) >= $min && length($word) <= $max,
       "word($min,$max) should generate a password between $min and $max chars");
}