1 import Test
.Cabal
.Prelude
2 import Data
.List
(subsequences
)
5 [ ["--output-format", "json"]
6 , ["--output-format", "key-value"]
7 , [] -- no specific output format
12 , "--remote-repo-cache"
20 forM_ allOutputFormats
$ \outputFormat
-> do
21 -- Mix and match with some flags
22 cabal
"path" $ outputFormat
<> ["--compiler-info", "--logs-dir", "--installdir"]
23 cabal
"path" $ outputFormat
<> ["--store-dir", "--compiler-info", "--config-file"]
24 cabal
"path" $ outputFormat
<> ["--remote-repo-cache", "--compiler-info"]
25 cabal
"path" $ outputFormat
<> []
26 -- 'cabal path' works when the compiler is unknown but no compiler info is asked.
27 -- requires '-z' flag.
28 forM_ cabalPathPathFlags
$ \pathFlag
-> do
29 cabal
"path" $ ["-w", "unknown-compiler", "-z"] <> outputFormat
<> [pathFlag
]