Add migration guide for #9718 (#10578)
[cabal.git] / Cabal-tests / Cabal-tests.cabal
blob60ae8828610c6f0b9aa5d971957d7133a2859879
1 cabal-version: 2.2
2 name:          Cabal-tests
3 version:       3
4 copyright:     2003-2024, Cabal Development Team (see AUTHORS file)
5 license:       BSD-3-Clause
6 license-file:  LICENSE
7 author:        Cabal Development Team <cabal-devel@haskell.org>
8 maintainer:    cabal-devel@haskell.org
9 homepage:      http://www.haskell.org/cabal/
10 bug-reports:   https://github.com/haskell/cabal/issues
11 synopsis:      Tests for Cabal library
12 description:   The tests are external for development flows convenience.
13 category:      Distribution
14 build-type:    Simple
16 source-repository head
17   type:     git
18   location: https://github.com/haskell/cabal/
19   subdir:   Cabal-tests
21 -- Common utilities which can be used by all tests.
22 library
23   hs-source-dirs: lib
24   exposed-modules: Test.Utils.TempTestDir
25   build-depends: base, directory, Cabal, filepath, exceptions
27 -- Small, fast running tests.
28 test-suite unit-tests
29   type:             exitcode-stdio-1.0
30   hs-source-dirs:   tests
31   other-modules:
32     Test.Laws
33     Test.QuickCheck.Utils
34     UnitTests.Distribution.CabalSpecVersion
35     UnitTests.Distribution.Compat.Graph
36     UnitTests.Distribution.Compat.Time
37     UnitTests.Distribution.Described
38     UnitTests.Distribution.PackageDescription.Check
39     UnitTests.Distribution.PkgconfigVersion
40     UnitTests.Distribution.Simple.Command
41     UnitTests.Distribution.Simple.Glob
42     UnitTests.Distribution.Simple.Program.GHC
43     UnitTests.Distribution.Simple.Program.Internal
44     UnitTests.Distribution.Simple.Utils
45     UnitTests.Distribution.SPDX
46     UnitTests.Distribution.System
47     UnitTests.Distribution.Types.GenericPackageDescription
48     UnitTests.Distribution.Utils.CharSet
49     UnitTests.Distribution.Utils.Generic
50     UnitTests.Distribution.Utils.Json
51     UnitTests.Distribution.Utils.NubList
52     UnitTests.Distribution.Utils.ShortText
53     UnitTests.Distribution.Utils.Structured
54     UnitTests.Distribution.Version
56   main-is:          UnitTests.hs
57   build-depends:
58       array
59     , base                >=4.13    && <5
60     , bytestring
61     , Cabal
62     , Cabal-described
63     , Cabal-syntax
64     , Cabal-QuickCheck
65     , containers
66     , Diff                >=0.4   && <0.6
67     , directory
68     , filepath
69     , pretty
70     , QuickCheck          >=2.14  && <2.15
71     , tasty               >=1.2.3 && <1.6
72     , tasty-hunit
73     , tasty-quickcheck    <0.12
74     , temporary
75     , text
77   ghc-options:      -Wall
78   default-language: Haskell2010
80 test-suite parser-tests
81   type:             exitcode-stdio-1.0
82   hs-source-dirs:   tests
83   main-is:          ParserTests.hs
84   build-depends:
85       base
86     , base-compat       >=0.11.0  && <0.14
87     , bytestring
88     , Cabal-syntax
89     , Cabal-tree-diff
90     , Diff              >=0.4     && <0.6
91     , directory
92     , filepath
93     , tasty             >=1.2.3   && <1.6
94     , tasty-golden      >=2.3.1.1 && <2.4
95     , tasty-hunit
96     , tree-diff         >=0.1     && <0.4
98   ghc-options:      -Wall
99   default-language: Haskell2010
101 test-suite check-tests
102   type:             exitcode-stdio-1.0
103   hs-source-dirs:   tests
104   main-is:          CheckTests.hs
105   build-depends:
106       base
107     , bytestring
108     , Cabal
109     , Cabal-syntax
110     , Diff          >=0.4     && <0.6
111     , directory
112     , filepath
113     , tasty         >=1.2.3   && <1.6
114     , tasty-golden  >=2.3.1.1 && <2.4
116   ghc-options:      -Wall
117   default-language: Haskell2010
119 test-suite custom-setup-tests
120   type:             exitcode-stdio-1.0
121   hs-source-dirs:   tests/custom-setup
122   main-is:          CustomSetupTests.hs
123   other-modules:
124     CabalDoctestSetup
125     IdrisSetup
127   build-depends:
128       base
129     , Cabal
130     , Cabal-syntax
131     , directory
132     , filepath
133     , process
135   default-language: Haskell2010
137 test-suite hackage-tests
138   type:               exitcode-stdio-1.0
139   main-is:            HackageTests.hs
142   hs-source-dirs:     tests
143   build-depends:
144       base
145     , bytestring
146     , Cabal
147     , Cabal-syntax
148     , Cabal-tree-diff
149     , deepseq
150     , directory
151     , filepath
152     , time
154   build-depends:
155       base-compat           >=0.11.0   && <0.14
156     , base-orphans          >=0.6      && <0.10
157     , clock                 >=0.8      && <0.9
158     , optparse-applicative  >=0.13.2.0 && <0.19
159     , tar                   >=0.5.0.3  && <0.7
160     , tree-diff             >=0.1      && <0.4
162   ghc-options:        -Wall -rtsopts -threaded
163   default-extensions: CPP
164   default-language:   Haskell2010
166 test-suite rpmvercmp
167   type:             exitcode-stdio-1.0
168   main-is:          RPMVerCmp.hs
169   hs-source-dirs:   tests
170   build-depends:
171       base
172     , bytestring
173     , Cabal-syntax
175   build-depends:
176       QuickCheck
177     , tasty             >=1.2.3 && <1.6
178     , tasty-hunit
179     , tasty-quickcheck  <0.12
181   c-sources:        tests/cbits/rpmvercmp.c
182   cc-options:       -Wall
183   ghc-options:      -Wall
184   default-language: Haskell2010
186 test-suite no-thunks-test
187   default-language: Haskell2010
188   ghc-options:      -Wall
189   type:             exitcode-stdio-1.0
190   main-is:          NoThunks.hs
191   hs-source-dirs:   tests
192   build-depends:
193       base
194     , bytestring
195     , Cabal-syntax
196     , tasty        >=1.2.3 && <1.6
197     , tasty-hunit
199   -- this is test is buildable on old GHCs
200   -- but it doesn't do anything.
201   if impl(ghc >=8.6)
202     build-depends: nothunks >=0.1.1.0 && <0.3