Improve CopyDirRecursiveCollectFailures tests
This commit is contained in:
parent
5d5b0ae3c1
commit
3baecb7b51
@ -202,7 +202,7 @@ spec = beforeAll_ (upTmpDir >> setupFiles) $ afterAll_ cleanupFiles $
|
|||||||
Strict
|
Strict
|
||||||
CollectFailures
|
CollectFailures
|
||||||
`shouldThrow`
|
`shouldThrow`
|
||||||
(\(RecursiveFailure [(_, e)]) -> ioeGetErrorType e == AlreadyExists)
|
(\(RecursiveFailure [(CreateDirFailed{}, e)]) -> ioeGetErrorType e == AlreadyExists)
|
||||||
|
|
||||||
it "copyDirRecursive (Strict, CollectFailures), destination already exists and is a file" $
|
it "copyDirRecursive (Strict, CollectFailures), destination already exists and is a file" $
|
||||||
copyDirRecursive' "inputDir"
|
copyDirRecursive' "inputDir"
|
||||||
@ -218,7 +218,7 @@ spec = beforeAll_ (upTmpDir >> setupFiles) $ afterAll_ cleanupFiles $
|
|||||||
Strict
|
Strict
|
||||||
CollectFailures
|
CollectFailures
|
||||||
`shouldThrow`
|
`shouldThrow`
|
||||||
(\(RecursiveFailure [(_, e)]) -> ioeGetErrorType e == InappropriateType)
|
(\(RecursiveFailure [(ReadContentsFailed{}, e)]) -> ioeGetErrorType e == InappropriateType)
|
||||||
|
|
||||||
it "copyDirRecursive (Strict, CollectFailures), wrong input (symlink to directory)" $
|
it "copyDirRecursive (Strict, CollectFailures), wrong input (symlink to directory)" $
|
||||||
copyDirRecursive' "wrongInputSymL"
|
copyDirRecursive' "wrongInputSymL"
|
||||||
@ -226,7 +226,7 @@ spec = beforeAll_ (upTmpDir >> setupFiles) $ afterAll_ cleanupFiles $
|
|||||||
Strict
|
Strict
|
||||||
CollectFailures
|
CollectFailures
|
||||||
`shouldThrow`
|
`shouldThrow`
|
||||||
(\(RecursiveFailure [(_, e)]) -> ioeGetErrorType e == InvalidArgument)
|
(\(RecursiveFailure [(ReadContentsFailed{}, e)]) -> ioeGetErrorType e == InvalidArgument)
|
||||||
|
|
||||||
it "copyDirRecursive (Strict, CollectFailures), destination in source" $
|
it "copyDirRecursive (Strict, CollectFailures), destination in source" $
|
||||||
copyDirRecursive' "inputDir"
|
copyDirRecursive' "inputDir"
|
||||||
|
Loading…
Reference in New Issue
Block a user