Skip to content

Commit 3fb9f45

Browse files
committed
Bump two Spec tests for more recent LTS/GHC
1 parent fba560f commit 3fb9f45

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/test/Stack/ConfigSpec.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import Test.Hspec
2424

2525
sampleConfig :: String
2626
sampleConfig =
27-
"resolver: lts-2.10\n" ++
27+
"resolver: lts-19.22\n" ++
2828
"packages: ['.']\n"
2929

3030
buildOptsConfig :: String
3131
buildOptsConfig =
32-
"resolver: lts-2.10\n" ++
32+
"resolver: lts-19.22\n" ++
3333
"packages: ['.']\n" ++
3434
"build:\n" ++
3535
" library-profiling: true\n" ++
@@ -56,24 +56,24 @@ buildOptsConfig =
5656

5757
hpackConfig :: String
5858
hpackConfig =
59-
"resolver: lts-2.10\n" ++
59+
"resolver: lts-19.22\n" ++
6060
"with-hpack: /usr/local/bin/hpack\n" ++
6161
"packages: ['.']\n"
6262

6363
resolverConfig :: String
6464
resolverConfig =
65-
"resolver: lts-2.10\n" ++
65+
"resolver: lts-19.22\n" ++
6666
"packages: ['.']\n"
6767

6868
snapshotConfig :: String
6969
snapshotConfig =
70-
"snapshot: lts-2.10\n" ++
70+
"snapshot: lts-19.22\n" ++
7171
"packages: ['.']\n"
7272

7373
resolverSnapshotConfig :: String
7474
resolverSnapshotConfig =
75-
"resolver: lts-2.10\n" ++
76-
"snapshot: lts-2.10\n" ++
75+
"resolver: lts-19.22\n" ++
76+
"snapshot: lts-19.22\n" ++
7777
"packages: ['.']\n"
7878

7979
stackDotYaml :: Path Rel File
@@ -123,11 +123,11 @@ spec = beforeAll setup $ do
123123

124124
it "parses snapshot using 'resolver'" $ inTempDir $ do
125125
loadProject resolverConfig $ \Project{..} ->
126-
projectResolver `shouldBe` RSLSynonym (LTS 2 10)
126+
projectResolver `shouldBe` RSLSynonym (LTS 19 22)
127127

128128
it "parses snapshot using 'snapshot'" $ inTempDir $ do
129129
loadProject snapshotConfig $ \Project{..} ->
130-
projectResolver `shouldBe` RSLSynonym (LTS 2 10)
130+
projectResolver `shouldBe` RSLSynonym (LTS 19 22)
131131

132132
it "throws if both 'resolver' and 'snapshot' are present" $ inTempDir $ do
133133
loadProject resolverSnapshotConfig (const (return ()))
@@ -213,7 +213,7 @@ spec = beforeAll setup $ do
213213
yamlAbs = parentDir </> yamlRel
214214
packageYaml = childRel </> either impureThrow id (parseRelFile "package.yaml")
215215
createDirectoryIfMissing True $ toFilePath $ parent yamlAbs
216-
writeFile (toFilePath yamlAbs) "resolver: ghc-7.8"
216+
writeFile (toFilePath yamlAbs) "resolver: ghc-9.0"
217217
writeFile (toFilePath packageYaml) "name: foo"
218218
withEnvVar "STACK_YAML" (toFilePath yamlRel) $ loadConfig' $ \config -> liftIO $ do
219219
BuildConfig{..} <- runRIO config $ withBuildConfig ask

src/test/Stack/NixSpec.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import Test.Hspec
2323

2424
sampleConfigNixEnabled :: String
2525
sampleConfigNixEnabled =
26-
"resolver: lts-2.10\n" ++
26+
"resolver: lts-19.22\n" ++
2727
"packages: ['.']\n" ++
2828
"system-ghc: true\n" ++
2929
"nix:\n" ++
@@ -32,7 +32,7 @@ sampleConfigNixEnabled =
3232

3333
sampleConfigNixDisabled :: String
3434
sampleConfigNixDisabled =
35-
"resolver: lts-2.10\n" ++
35+
"resolver: lts-19.22\n" ++
3636
"packages: ['.']\n" ++
3737
"nix:\n" ++
3838
" enable: False"
@@ -101,6 +101,6 @@ spec = beforeAll setup $ do
101101
nixEnable (configNix config) `shouldBe` trueOnNonWindows
102102
it "sees that the only package asked for is glpk and asks for the correct GHC derivation" $ loadConfig' mempty $ \config -> do
103103
nixPackages (configNix config) `shouldBe` ["glpk"]
104-
v <- parseVersionThrowing "7.10.3"
104+
v <- parseVersionThrowing "9.0.2"
105105
ghc <- either throwIO return $ nixCompiler (WCGhc v)
106-
ghc `shouldBe` "haskell.compiler.ghc7103"
106+
ghc `shouldBe` "haskell.compiler.ghc902"

0 commit comments

Comments
 (0)