Add validate-revision workflow
[cabal.git] / Cabal-tests / Cabal-tests.cabal
blob19572b2d0d15711208febe200184fefab7eef7fc
1 cabal-version: 2.2
2 name:          Cabal-tests
3 version:       3
4 copyright:     2003-2023, 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
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.PkgconfigVersion
39     UnitTests.Distribution.Simple.Command
40     UnitTests.Distribution.Simple.Glob
41     UnitTests.Distribution.Simple.Program.GHC
42     UnitTests.Distribution.Simple.Program.Internal
43     UnitTests.Distribution.Simple.Utils
44     UnitTests.Distribution.SPDX
45     UnitTests.Distribution.System
46     UnitTests.Distribution.Types.GenericPackageDescription
47     UnitTests.Distribution.Utils.CharSet
48     UnitTests.Distribution.Utils.Generic
49     UnitTests.Distribution.Utils.Json
50     UnitTests.Distribution.Utils.NubList
51     UnitTests.Distribution.Utils.ShortText
52     UnitTests.Distribution.Utils.Structured
53     UnitTests.Distribution.Version
54     UnitTests.Orphans
56   main-is:          UnitTests.hs
57   build-depends:
58       array
59     , async               >=2.2.2 && <2.3
60     , base                >=4.9     && <5
61     , binary
62     , bytestring
63     , Cabal
64     , Cabal-described
65     , Cabal-syntax
66     , Cabal-QuickCheck
67     , Cabal-tests
68     , containers
69     , deepseq
70     , Diff                >=0.4   && <0.6
71     , directory
72     , filepath
73     , integer-logarithms  >=1.0.2 && <1.1
74     , pretty
75     , QuickCheck          >=2.14  && <2.15
76     , rere                >=0.1   && <0.3
77     , tagged
78     , tasty               >=1.2.3 && <1.6
79     , tasty-hunit
80     , tasty-quickcheck
81     , temporary
82     , text
83     , transformers
85   ghc-options:      -Wall
86   default-language: Haskell2010
88 test-suite parser-tests
89   type:             exitcode-stdio-1.0
90   hs-source-dirs:   tests
91   main-is:          ParserTests.hs
92   build-depends:
93       base
94     , base-compat       >=0.11.0  && <0.14
95     , bytestring
96     , Cabal-syntax
97     , Cabal-tree-diff
98     , Diff              >=0.4     && <0.6
99     , directory
100     , filepath
101     , tasty             >=1.2.3   && <1.6
102     , tasty-golden      >=2.3.1.1 && <2.4
103     , tasty-hunit
104     , tasty-quickcheck
105     , tree-diff         >=0.1     && <0.4
107   ghc-options:      -Wall
108   default-language: Haskell2010
110 test-suite check-tests
111   type:             exitcode-stdio-1.0
112   hs-source-dirs:   tests
113   main-is:          CheckTests.hs
114   build-depends:
115       base
116     , bytestring
117     , Cabal
118     , Cabal-syntax
119     , Diff          >=0.4     && <0.6
120     , directory
121     , filepath
122     , tasty         >=1.2.3   && <1.6
123     , tasty-expected-failure
124     , tasty-golden  >=2.3.1.1 && <2.4
126   ghc-options:      -Wall
127   default-language: Haskell2010
129 test-suite custom-setup-tests
130   type:             exitcode-stdio-1.0
131   hs-source-dirs:   tests/custom-setup
132   main-is:          CustomSetupTests.hs
133   other-modules:
134     CabalDoctestSetup
135     IdrisSetup
137   build-depends:
138       base
139     , Cabal
140     , Cabal-syntax
141     , directory
142     , filepath
143     , process
145   default-language: Haskell2010
147 test-suite hackage-tests
148   type:               exitcode-stdio-1.0
149   main-is:            HackageTests.hs
152   hs-source-dirs:     tests
153   build-depends:
154       base
155     , bytestring
156     , Cabal
157     , Cabal-syntax
158     , Cabal-tree-diff
159     , containers
160     , deepseq
161     , directory
162     , filepath
164   build-depends:
165       base-compat           >=0.11.0   && <0.14
166     , base-orphans          >=0.6      && <0.10
167     , clock                 >=0.8      && <0.9
168     , optparse-applicative  >=0.13.2.0 && <0.19
169     , stm                   >=2.4.5.0  && <2.6
170     , tar                   >=0.5.0.3  && <0.7
171     , tree-diff             >=0.1      && <0.4
173   ghc-options:        -Wall -rtsopts -threaded
174   default-extensions: CPP
175   default-language:   Haskell2010
177 test-suite rpmvercmp
178   type:             exitcode-stdio-1.0
179   main-is:          RPMVerCmp.hs
180   hs-source-dirs:   tests
181   build-depends:
182       base
183     , bytestring
184     , Cabal-syntax
186   build-depends:
187       QuickCheck
188     , tasty             >=1.2.3 && <1.6
189     , tasty-hunit
190     , tasty-quickcheck
192   c-sources:        tests/cbits/rpmvercmp.c
193   cc-options:       -Wall
194   ghc-options:      -Wall
195   default-language: Haskell2010
197 test-suite no-thunks-test
198   default-language: Haskell2010
199   ghc-options:      -Wall
200   type:             exitcode-stdio-1.0
201   main-is:          NoThunks.hs
202   hs-source-dirs:   tests
203   build-depends:
204       base
205     , bytestring
206     , Cabal-syntax
207     , tasty        >=1.2.3 && <1.6
208     , tasty-hunit
210   -- this is test is buildable on old GHCs
211   -- but it doesn't do anything.
212   if impl(ghc >=8.6)
213     build-depends: nothunks >=0.1.1.0 && <0.2