Un-ignore .bat files
[cabal.git] / cabal-testsuite / PackageTests / Path / All / cabal.test.hs
bloba1c0db98e8c9cf892498306df1fca7cfe4903d49
1 import Test.Cabal.Prelude
2 import Data.List (subsequences)
4 allOutputFormats =
5 [ ["--output-format", "json"]
6 , ["--output-format", "key-value"]
7 , [] -- no specific output format
10 cabalPathPathFlags =
11 [ "--cache-home"
12 , "--remote-repo-cache"
13 , "--logs-dir"
14 , "--store-dir"
15 , "--config-file"
16 , "--installdir"
19 main = cabalTest $ do
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]