File: 04-chars.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 (18 lines) | stat: -rw-r--r-- 341 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!perl

use 5.006;
use strict;
use warnings;

my $min = 10;
my $max = 14;

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

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