Commit 218c7bfc authored by quasicomputational's avatar quasicomputational Committed by Mikhail Glushenkov
Browse files

Rudimentary test for sdist --list-sources.

parent 73889508
cabal-version: 2.2
name: list-sources
version: 0
data-dir: data
data-files: blah/*.dat
extra-source-files: extra-src/blah/*.html
extra-doc-files: extra-doc/blah/*.tex
executable dummy
default-language: Haskell2010
main-is: Main.hs
# cabal sdist
List of package sources written to file '<TMPDIR>/sources'
List of package sources written to file '<TMPDIR>/sources'
# Setup sdist
List of package sources written to file '<TMPDIR>/sources'
import System.FilePath (normalise)
import Test.Cabal.Prelude
main = setupTest $ do
tmpdir <- fmap testTmpDir getTestEnv
let fn = tmpdir </> "sources"
setup "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 "data/blah/a.dat"
assertFileDoesContain fn $ normalise "extra-src/blah/a.html"
assertFileDoesContain fn $ normalise "extra-doc/blah/a.tex"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment