Commit ee36db63 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Update the unit tests of the testsuite feature

parent 3ba9b6f0
......@@ -13,6 +13,7 @@ import Distribution.Package
( PackageIdentifier(..), PackageName(..), Dependency(..) )
import Distribution.PackageDescription
( PackageDescription(..), BuildInfo(..), TestSuite(..), Library(..)
, TestSuiteInterface(..)
, TestType(..), emptyPackageDescription, emptyBuildInfo, emptyLibrary
, emptyTestSuite, BuildType(..) )
import Distribution.Verbosity (silent)
......@@ -47,7 +48,7 @@ suite cabalVersion = TestCase $ do
, stability = "stable"
, description = "Check that Cabal recognizes the Test stanza defined below."
, category = "PackageTests"
, descCabalVersion = anyVersion
, specVersionRaw = Right anyVersion
, buildType = Just Simple
, buildDepends =
[ Dependency (PackageName "base") anyV ]
......@@ -61,7 +62,7 @@ suite cabalVersion = TestCase $ do
}
, testSuites = [ emptyTestSuite
{ testName = "dummy"
, testType = ExeTest (Version [1,0] []) "dummy.hs"
, testInterface = TestSuiteExeV10 (Version [1,0] []) "dummy.hs"
, testBuildInfo = emptyBuildInfo
{ targetBuildDepends =
[ Dependency (PackageName "base") anyVersion ]
......@@ -75,4 +76,4 @@ suite cabalVersion = TestCase $ do
(unlines $ map (show . disp) xs)
in assertEqual depMessage True False
Right (f, _) -> assertEqual "parsed package description does not match anticipated"
f anticipatedFinalPD
\ No newline at end of file
f anticipatedFinalPD
......@@ -26,6 +26,7 @@ import PackageTests.TestStanza.Check
import Distribution.Text (display)
import Distribution.Simple.Utils (cabalVersion)
import Data.Version
import System.Directory
hunit :: TestName -> HUnit.Test -> Test
hunit name test = testGroup name $ hUnitTestToTests test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment