From d708f80a1f18d73eca077c76ea543586ed39e839 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 5 Jun 2016 15:37:26 +0200 Subject: [PATCH] TESTS: don't assume ordering of exceptions --- test/HPath/IO/CopyDirRecursiveCollectFailuresSpec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/HPath/IO/CopyDirRecursiveCollectFailuresSpec.hs b/test/HPath/IO/CopyDirRecursiveCollectFailuresSpec.hs index bf19617..7118e62 100644 --- a/test/HPath/IO/CopyDirRecursiveCollectFailuresSpec.hs +++ b/test/HPath/IO/CopyDirRecursiveCollectFailuresSpec.hs @@ -164,9 +164,9 @@ spec = beforeAll_ (upTmpDir >> setupFiles) $ afterAll_ cleanupFiles $ Overwrite CollectFailures `shouldThrow` - (\(RecursiveFailure [e1, e2]) -> - ioeGetErrorType e1 == InappropriateType && - ioeGetErrorType e2 == PermissionDenied) + (\(RecursiveFailure ex@[_, _]) -> + any (\e -> ioeGetErrorType e == InappropriateType) ex && + any (\e -> ioeGetErrorType e == PermissionDenied) ex) normalDirPerms "outputDir1/foo2/foo4" normalDirPerms "outputDir1/foo2/foo4/inputFile4" c <- allDirectoryContents' "outputDir1"