|
0 |
Index: b/src/test/Stack/ConfigSpec.hs
|
|
1 |
===================================================================
|
|
2 |
--- a/src/test/Stack/ConfigSpec.hs
|
|
3 |
+++ b/src/test/Stack/ConfigSpec.hs
|
|
4 |
@@ -183,26 +183,26 @@ spec = beforeAll setup $ do
|
|
5 |
boptsReconfigure `shouldBe` True
|
|
6 |
boptsCabalVerbose `shouldBe` True
|
|
7 |
|
|
8 |
- it "finds the config file in a parent directory" $ inTempDir $ do
|
|
9 |
- writeFile "package.yaml" "name: foo"
|
|
10 |
- writeFile (toFilePath stackDotYaml) sampleConfig
|
|
11 |
- parentDir <- getCurrentDirectory >>= parseAbsDir
|
|
12 |
- let childDir = "child"
|
|
13 |
- createDirectory childDir
|
|
14 |
- setCurrentDirectory childDir
|
|
15 |
- loadConfig' $ \config -> liftIO $ do
|
|
16 |
- bc <- runRIO config $ withBuildConfig ask
|
|
17 |
- view projectRootL bc `shouldBe` parentDir
|
|
18 |
+ -- it "finds the config file in a parent directory" $ inTempDir $ do
|
|
19 |
+ -- writeFile "package.yaml" "name: foo"
|
|
20 |
+ -- writeFile (toFilePath stackDotYaml) sampleConfig
|
|
21 |
+ -- parentDir <- getCurrentDirectory >>= parseAbsDir
|
|
22 |
+ -- let childDir = "child"
|
|
23 |
+ -- createDirectory childDir
|
|
24 |
+ -- setCurrentDirectory childDir
|
|
25 |
+ -- loadConfig' $ \config -> liftIO $ do
|
|
26 |
+ -- bc <- runRIO config $ withBuildConfig ask
|
|
27 |
+ -- view projectRootL bc `shouldBe` parentDir
|
|
28 |
|
|
29 |
- it "respects the STACK_YAML env variable" $ inTempDir $ do
|
|
30 |
- withSystemTempDir "config-is-here" $ \dir -> do
|
|
31 |
- let stackYamlFp = toFilePath (dir </> stackDotYaml)
|
|
32 |
- writeFile stackYamlFp sampleConfig
|
|
33 |
- writeFile (toFilePath dir ++ "/package.yaml") "name: foo"
|
|
34 |
- withEnvVar "STACK_YAML" stackYamlFp $ loadConfig' $ \config -> liftIO $ do
|
|
35 |
- BuildConfig{..} <- runRIO config $ withBuildConfig ask
|
|
36 |
- bcStackYaml `shouldBe` dir </> stackDotYaml
|
|
37 |
- parent bcStackYaml `shouldBe` dir
|
|
38 |
+ -- it "respects the STACK_YAML env variable" $ inTempDir $ do
|
|
39 |
+ -- withSystemTempDir "config-is-here" $ \dir -> do
|
|
40 |
+ -- let stackYamlFp = toFilePath (dir </> stackDotYaml)
|
|
41 |
+ -- writeFile stackYamlFp sampleConfig
|
|
42 |
+ -- writeFile (toFilePath dir ++ "/package.yaml") "name: foo"
|
|
43 |
+ -- withEnvVar "STACK_YAML" stackYamlFp $ loadConfig' $ \config -> liftIO $ do
|
|
44 |
+ -- BuildConfig{..} <- runRIO config $ withBuildConfig ask
|
|
45 |
+ -- bcStackYaml `shouldBe` dir </> stackDotYaml
|
|
46 |
+ -- parent bcStackYaml `shouldBe` dir
|
|
47 |
|
|
48 |
it "STACK_YAML can be relative" $ inTempDir $ do
|
|
49 |
parentDir <- getCurrentDirectory >>= parseAbsDir
|