applied hlint suggestions

This commit is contained in:
Jonathan Lamothe
2018-12-17 00:04:43 -05:00
parent 2e8a638756
commit 14e367bd43
3 changed files with 18 additions and 21 deletions

View File

@@ -28,18 +28,18 @@ import Test.HUnit (Test(..), (~?=))
import Password
tests = TestLabel "applyPWPolicy" $ TestList $ map test'
[ ( "default pass", "password", id, True )
, ( "too long", take 99 $ repeat 'x', id, False )
, ( "insufficient upper", "password", set pwUpper 1, False )
, ( "sufficient upper", "Password", set pwUpper 1, True )
, ( "insufficient lower", "PASSWORD", set pwLower 1, False )
, ( "sufficient lower", "password", set pwLower 1, True )
, ( "insufficient digits", "password", set pwDigits 1, False )
, ( "sufficient digits", "password1", set pwDigits 1, True )
, ( "insufficient special", "Password1", spec (Just 1), False )
, ( "sufficient special", "Password1/", spec (Just 1), True )
, ( "illegal special", "Password1/", spec Nothing, False )
, ( "bad policy", "password", badPolicy, False )
[ ( "default pass", "password", id, True )
, ( "too long", replicate 99 'x', id, False )
, ( "insufficient upper", "password", set pwUpper 1, False )
, ( "sufficient upper", "Password", set pwUpper 1, True )
, ( "insufficient lower", "PASSWORD", set pwLower 1, False )
, ( "sufficient lower", "password", set pwLower 1, True )
, ( "insufficient digits", "password", set pwDigits 1, False )
, ( "sufficient digits", "password1", set pwDigits 1, True )
, ( "insufficient special", "Password1", spec (Just 1), False )
, ( "sufficient special", "Password1/", spec (Just 1), True )
, ( "illegal special", "Password1/", spec Nothing, False )
, ( "bad policy", "password", badPolicy, False )
]
test' (label, pw, f, expect) = TestLabel label $