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-benchmarks"]
15 lbi
<- getLocalBuildInfoM
16 let gotBenchmark
= head $ benchmarks
(localPkgDescr lbi
)
17 assertEqual
"benchmarkName"
18 (mkUnqualComponentName
"dummy")
19 (benchmarkName gotBenchmark
)
20 assertEqual
"benchmarkInterface"
21 (BenchmarkExeV10
(mkVersion
[1,0]) "dummy.hs")
22 (benchmarkInterface gotBenchmark
)
23 -- NB: Not testing targetBuildDepends (benchmarkBuildInfo gotBenchmark),
24 -- as the dependency varies with cabal-install
26 "benchmarkBuildInfo/hsSourceDirs"
28 (hsSourceDirs
(benchmarkBuildInfo gotBenchmark
))