File: 02length.t

package info (click to toggle)
libstring-mkpasswd-perl 0.05-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 140 kB
  • ctags: 22
  • sloc: perl: 272; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use Test::More tests => 22;
BEGIN { use_ok('String::MkPasswd') };

String::MkPasswd->import("mkpasswd");

ok(length mkpasswd(-length => 0) == 9, "length = 0");

for ( 1 .. 6 ) {
	ok(!defined mkpasswd(-length => $_), "length = $_");
}

for ( 7 .. 20 ) {
	ok(length mkpasswd(-length => $_) == $_, "length = $_");
}