Skip to content

Commit

Permalink
Add regression test for haskell#177
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufflewind committed May 20, 2024
1 parent 81d4be1 commit e8ee4d5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog for the [`directory`][1] package
==========================================

## 1.3.8.5 (May 2024)

* Fix regression that causes copying of nonexistent files to create empty
files.
([#177](https://github.com/haskell/directory/issues/177))

## 1.3.8.4 (Apr 2024)

* Relax `time` version bounds to support 1.14.
Expand Down
2 changes: 1 addition & 1 deletion directory.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: directory
version: 1.3.8.4
version: 1.3.8.5
license: BSD-3-Clause
license-file: LICENSE
maintainer: [email protected]
Expand Down
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 e8ee4d5

Please sign in to comment.