Skip to content

Commit

Permalink
Test for indicentally-fixed haskell#5195.
Browse files Browse the repository at this point in the history
I fixed this in passing with haskell#5284, but let's add a test to make sure
it stays fixed. The error message isn't perfect, but it's a lot better
than failing silently!

Closes haskell#5195.
  • Loading branch information
quasicomputational committed May 26, 2018
1 parent 7783ad1 commit 5bc0b89
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions cabal-testsuite/PackageTests/SDist/T5195/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main = putStrLn "hi"
2 changes: 2 additions & 0 deletions cabal-testsuite/PackageTests/SDist/T5195/cabal.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# cabal sdist
cabal: filepath wildcard './actually-a-directory' does not match any files.
6 changes: 6 additions & 0 deletions cabal-testsuite/PackageTests/SDist/T5195/cabal.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Test.Cabal.Prelude
main = cabalTest $ do
tmpdir <- fmap testTmpDir getTestEnv
let fn = tmpdir </> "sources"
res <- fails $ cabal' "sdist" ["--list-sources=" ++ fn]
assertOutputContains "filepath wildcard './actually-a-directory' does not match any files" res
10 changes: 10 additions & 0 deletions cabal-testsuite/PackageTests/SDist/T5195/t5195.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cabal-version: 2.2
name: t5195
version: 0

extra-source-files:
./actually-a-directory

executable foo
default-language: Haskell2010
main-is: Main.hs

0 comments on commit 5bc0b89

Please sign in to comment.