1 ! Copyright (C) 2019 Alexander Ilin.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: math math.parser random.passwords sequences tools.test ;
4 IN: random.passwords.tests
6 { "aaaaaaaaaa" } [ 10 "a" password ] unit-test
7 { 10 } [ 10 "ab" password length ] unit-test
8 { "" } [ 0 "ab" password ] unit-test
9 [ -1 "ab" password ] must-fail
11 { 2 } [ 2 ascii-password length ] unit-test
12 { 3 } [ 3 alnum-password length ] unit-test
13 { 4 } [ 4 hex-password length ] unit-test
14 { t } [ 4 hex-password hex> 65535 <= ] unit-test