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