1 import Test
.Cabal
.Prelude
2 import Data
.Foldable
(traverse_
)
3 import Distribution
.Simple
.Utils
4 import System
.Directory
6 -- Test the forbidden characters except NUL. Reference:
7 -- https://www.gnu.org/software/autoconf/manual/autoconf.html#File-System-Conventions
8 -- Most of these are magic on Windows, so don't bother testing there.
10 -- Note: we bundle the configure script so no need to autoreconf
38 let cwd
= testCurrentDir env
39 liftIO
$ createDirectory (testCurrentDir env
</> dir
)
40 liftIO
$ copyFiles
minBound (testCurrentDir env
</> dir
)
45 -- 'cabal' from the prelude requires the command to succeed; we
46 -- don't mind if it fails, so long as we get the warning. This is
47 -- an inlined+specialised version of 'cabal' for v1-configure.
49 defaultRecordMode RecordMarked
$ do
51 recordHeader
["cabal", "v1-configure"]
55 , "-vverbose +markoutput +nowrap"
59 configured_prog
<- requireProgramM cabalProgram
60 r
<- liftIO
$ run
(testVerbosity env
)
61 (Just
$ testCurrentDir env
</> dir
)
63 (programPath configured_prog
)