add createDirectory (already exists) test
[haskell-directory.git] / tests / createDirectory001.hs
1 import System.Directory\r
2 import Control.Exception\r
3 \r
4 testdir = "createDirectory001.dir"\r
5 \r
6 main = do\r
7   try (removeDirectory testdir) :: IO (Either IOException ())\r
8   createDirectory testdir\r
9   r <- try $ createDirectory testdir\r
10   print (r :: Either IOException ()) -- already exists\r
11   removeDirectory testdir\r
12 \r