forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR haskell#5284 changed things around, and now matchDirFileGlob will break if it's passed a null directory, which happens to be the default value for data-dir. Its call sites have been fixed to check for this and to substitute '.' for an empty path, which is the desired behaviour; in addition, matchDirFileGlob itself will now warn about this if it's detected, so that new broken call sites can't sneak in. Fixes haskell#5318.
- Loading branch information
1 parent
765de7b
commit 08ff6e3
Showing
8 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
main = putStrLn "hi" |
10 changes: 10 additions & 0 deletions
10
cabal-testsuite/PackageTests/Regression/T5318/empty-data-dir.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cabal-version: 2.0 | ||
name: empty-data-dir | ||
version: 0 | ||
build-type: Simple | ||
data-files: foo.dat | ||
|
||
executable foo | ||
default-language: Haskell2010 | ||
build-depends: base | ||
main-is: Main.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello! |
3 changes: 3 additions & 0 deletions
3
cabal-testsuite/PackageTests/Regression/T5318/install.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ | ||
cabal "install" [] |
7 changes: 7 additions & 0 deletions
7
cabal-testsuite/PackageTests/Regression/T5318/sdist-list-sources.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
tmpdir <- fmap testTmpDir getTestEnv | ||
let fn = tmpdir </> "sources" | ||
cabal "sdist" ["--list-sources=" ++ fn] | ||
-- --list-sources outputs with slashes on posix and backslashes on Windows. 'normalise' converts our needle to the necessary format. | ||
assertFileDoesContain fn $ normalise "foo.dat" |