Require that the SHA256 backend can be used when building, since it's the default.

This commit is contained in:
Joey Hess 2012-05-31 23:15:40 -04:00
parent f5de183c71
commit 2183fd2abd
3 changed files with 8 additions and 5 deletions

View file

@ -26,15 +26,16 @@ tests =
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
, TestCase "ssh connection caching" getSshConnectionCaching
] ++ shaTestCases [1, 256, 512, 224, 384]
] ++ shaTestCases False [1, 512, 224, 384] ++ shaTestCases True [256]
shaTestCases :: [Int] -> [TestCase]
shaTestCases l = map make l
shaTestCases :: Bool -> [Int] -> [TestCase]
shaTestCases required l = map make l
where make n =
let
cmds = map (\x -> "sha" ++ show n ++ x) ["", "sum"]
key = "sha" ++ show n
in TestCase key $ maybeSelectCmd key cmds "</dev/null"
selector = if required then selectCmd else maybeSelectCmd
in TestCase key $ selector key cmds "</dev/null"
tmpDir :: String
tmpDir = "tmp"