[commit: packages/directory] master: Restore tests for getDirectoryContents in GetDirContents001 (38f9d57)
git at git.haskell.org
git at git.haskell.org
Fri Dec 18 09:52:54 UTC 2015
Repository : ssh://git@git.haskell.org/directory
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/38f9d577b153e3e5d6c3cdc8fb6dea4b76998349/directory
>---------------------------------------------------------------
commit 38f9d577b153e3e5d6c3cdc8fb6dea4b76998349
Author: Phil Ruffwind <rf at rufflewind.com>
Date: Sat Oct 3 14:18:10 2015 -0400
Restore tests for getDirectoryContents in GetDirContents001
>---------------------------------------------------------------
38f9d577b153e3e5d6c3cdc8fb6dea4b76998349
tests/GetDirContents001.hs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/GetDirContents001.hs b/tests/GetDirContents001.hs
index b529337..768d79a 100644
--- a/tests/GetDirContents001.hs
+++ b/tests/GetDirContents001.hs
@@ -10,10 +10,13 @@ import System.FilePath ((</>))
main :: TestEnv -> IO ()
main _t = do
createDirectory dir
+ T(expectEq) () specials . sort =<< getDirectoryContents dir
T(expectEq) () [] . sort =<< getDirectoryContentsA dir
names <- for [1 .. 100 :: Int] $ \ i -> do
let name = 'f' : show i
writeFile (dir </> name) ""
return name
+ T(expectEq) () (sort (specials <> names)) . sort =<< getDirectoryContents dir
T(expectEq) () (sort names) . sort =<< getDirectoryContentsA dir
where dir = "dir"
+ specials = [".", ".."]
More information about the ghc-commits
mailing list