recognise differently-named shaN programs

This commit is contained in:
Fraser Tweedale 2011-04-08 10:08:11 +10:00
parent bd1bbc21fa
commit f5b2d650bb
3 changed files with 28 additions and 13 deletions

View file

@ -20,10 +20,11 @@ tests = [
shaTestCases :: [Int] -> [TestCase]
shaTestCases l = map make l
where
make n =
let cmd = "sha" ++ show n ++ "sum"
in TestCase cmd $ requireCmd cmd (cmd ++ " </dev/null")
where make n =
let
cmds = map (\x -> "sha" ++ show n ++ x ++ " </dev/null") ["", "sum"]
key = "sha" ++ show n
in TestCase key $ whichCmd key cmds
tmpDir :: String
tmpDir = "tmp"