Skip to content

Commit 71de533

Browse files
committed
Add tests for haskell#9799
Add tests for haskell#9799 about freeze qualifying all packages with 'any' constraint scope.
1 parent aaf16c4 commit 71de533

37 files changed

+171
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for T9799
2+
3+
## 0.1.0.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
main = _
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cabal-version: 3.0
2+
name: T9799
3+
version: 0.1.0.0
4+
license: NONE
5+
build-type: Custom
6+
extra-doc-files: CHANGELOG.md
7+
8+
custom-setup
9+
setup-depends: libA == 0.2.0.0
10+
11+
library
12+
exposed-modules: MyLib
13+
build-depends: libA == 0.1.0.0
14+
hs-source-dirs: src
15+
default-language: Haskell2010
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Test.Cabal.Prelude
2+
main = cabalTest $ do
3+
expectBroken 9799 $ withRepo "repo" $ do
4+
cabal "v2-freeze" []
5+
cwd <- fmap testCurrentDir getTestEnv
6+
-- Guarantee that freeze writes scope-qualified constraints, not 'any'
7+
-- qualified constraints.
8+
assertFileDoesNotContain (cwd </> "cabal.project.freeze") "any.libA"
9+
assertFileDoesContain (cwd </> "cabal.project.freeze") "setup.libA == 0.2.0.0"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for libA0100
2+
3+
## 0.1.0.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cabal-version: 3.0
2+
name: libA
3+
version: 0.1.0.0
4+
license: NONE
5+
build-type: Simple
6+
extra-doc-files: CHANGELOG.md
7+
8+
library
9+
exposed-modules: MyLib
10+
hs-source-dirs: src
11+
default-language: Haskell2010
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module MyLib (someFunc) where
2+
3+
someFunc :: IO ()
4+
someFunc = putStrLn "someFunc"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for libA0100
2+
3+
## 0.1.0.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cabal-version: 3.0
2+
name: libA
3+
version: 0.2.0.0
4+
license: NONE
5+
build-type: Simple
6+
extra-doc-files: CHANGELOG.md
7+
8+
library
9+
exposed-modules: MyLib
10+
hs-source-dirs: src
11+
default-language: Haskell2010
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module MyLib (someFunc) where
2+
3+
someFunc :: IO ()
4+
someFunc = putStrLn "someFunc"

0 commit comments

Comments
 (0)