2 import Test
.Cabal
.Prelude
4 import Distribution
.Version
5 import Distribution
.Simple
.LocalBuildInfo
6 import Distribution
.Package
7 import Distribution
.PackageDescription
8 import Distribution
.Types
.UnqualComponentName
9 import Control
.Monad
.IO.Class
10 import Distribution
.Simple
.Configure
11 import Distribution
.Utils
.Path
13 main
= setupAndCabalTest
$ do
14 assertOutputDoesNotContain
"unknown section type"
15 =<< setup
' "configure" ["--enable-tests"]
16 lbi
<- getLocalBuildInfoM
17 let gotTestSuite
= head $ testSuites
(localPkgDescr lbi
)
18 assertEqual
"testName" (mkUnqualComponentName
"dummy")
19 (testName gotTestSuite
)
20 assertEqual
"testInterface" (TestSuiteExeV10
(mkVersion
[1,0])
21 #if MIN_VERSION_Cabal
(3,11,0)
25 (testInterface gotTestSuite
)
26 -- NB: Not testing targetBuildDepends (testBuildInfo gotTestSuite)
27 -- as dependency varies with cabal-install
29 "testBuildInfo/hsSourceDirs"
31 (hsSourceDirs
(testBuildInfo gotTestSuite
))