(cabal check) Add "Autogen include" test for ts
[cabal.git] / cabal-testsuite / PackageTests / TestStanza / setup.test.hs
blob1f33596d86c98765314554412fb2f39be8afb414
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
23 assertEqual
24 "testBuildInfo/hsSourceDirs"
25 [sameDirectory]
26 (hsSourceDirs (testBuildInfo gotTestSuite))
27 return ()