TESTS: add missing deleteDirRecursiveSpec, minor cleanup

This commit is contained in:
Julian Ospald 2016-05-03 11:53:46 +02:00
parent 70270d60ba
commit 4a86b4d2cf
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -62,6 +62,7 @@ main = hspec $ before_ fixPermissions $ after_ revertPermissions $ do
, recreateSymlinkSpec , recreateSymlinkSpec
, deleteFileSpec , deleteFileSpec
, deleteDirSpec , deleteDirSpec
, deleteDirRecursiveSpec
] ]
-- run all stateful tests twice to catch missing cleanups or state skew -- run all stateful tests twice to catch missing cleanups or state skew
@ -72,7 +73,6 @@ main = hspec $ before_ fixPermissions $ after_ revertPermissions $ do
getFileTypeSpec getFileTypeSpec
getDirsFilesSpec getDirsFilesSpec
-- TODO: deleteFile, deleteDir, deleteDirRecursive, getDirsFiles, getFileType
where where
noWriteDirs = ["test/copyFileSpec/outputDirNoWrite" noWriteDirs = ["test/copyFileSpec/outputDirNoWrite"
,"test/copyDirRecursiveSpec/noWritePerm" ,"test/copyDirRecursiveSpec/noWritePerm"
@ -91,7 +91,7 @@ main = hspec $ before_ fixPermissions $ after_ revertPermissions $ do
,"test/recreateSymlinkSpec/noPerms" ,"test/recreateSymlinkSpec/noPerms"
,"test/getFileTypeSpec/noPerms" ,"test/getFileTypeSpec/noPerms"
,"test/getDirsFilesSpec/noPerms" ,"test/getDirsFilesSpec/noPerms"
, "test/deleteFileSpec/noPerms" ,"test/deleteFileSpec/noPerms"
] ]
fixPermissions = do fixPermissions = do
sequence_ $ fmap noWritableDirPerms noWriteDirs sequence_ $ fmap noWritableDirPerms noWriteDirs