Skip to content

Commit

Permalink
Add regression test for 177
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufflewind committed May 20, 2024
1 parent 81d4be1 commit 80ef205
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/CopyFile001.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ main _t = do
copyFile (dir </> from) (dir </> to)
T(expectEq) () [from, to] . List.sort =<< listDirectory dir
T(expectEq) () contents =<< readFile (so (dir </> to))

-- Regression test for https://github.com/haskell/directory/issues/177
createDirectory "issue177"
T(expectIOErrorType) () isDoesNotExistError
(copyFile "issue177/nonexistentSrc" "issue177/dst")
T(expectEq) () [] =<< listDirectory "issue177"

where
contents = "This is the data\n"
from = "source"
Expand Down

0 comments on commit 80ef205

Please sign in to comment.