Un-ignore .bat files
[cabal.git] / cabal-testsuite / PackageTests / ConfigFile / T7705 / cabal.test.hs
blob35536f47822b1aecdb742294ca5058e5b36bbd13
1 -- 2021-10-07, issue #7705
2 --
3 -- Non-existent config file given explicitly (via option or environment variable)
4 -- should not be filled with default content.
5 -- Rather, an error should be raised.
6 --
7 -- See also @PackageTests/UserConfig/cabal.test.hs@ for testing of command
8 -- @user-config@.
9 --
10 -- We use the @info@ command as it does not have side-effects.
11 -- Does not really matter which command we use for this test,
12 -- except that it should accept option @--config-file@.
14 -- This is a golden value test that reports the produced error message.
15 -- Needs to be checked manually whether it meets expectations.
17 import Test.Cabal.Prelude
19 main = cabalTest $ do
20 fails $
21 cabalG [ "--config-file", "does.not.exist" ] "info" [ "happy" ]
22 fails $ withEnv [("CABAL_CONFIG", Just "absent.file")] $
23 cabal "info" [ "alex" ]