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