Commit ff2b174b authored by tibbe's avatar tibbe
Browse files

Add test for preprocessors

parent 81175a22
......@@ -156,6 +156,7 @@ test-suite package-tests
PackageTests.BuildDeps.TargetSpecificDeps2.Check,
PackageTests.BuildDeps.TargetSpecificDeps3.Check,
PackageTests.BuildDeps.SameDepsAllRound.Check,
PackageTests.PreProcess.Check,
PackageTests.TestOptions.Check,
PackageTests.TestStanza.Check,
PackageTests.TestSuiteExeV10.Check,
......
......@@ -30,6 +30,7 @@ import PackageTests.BuildDeps.TargetSpecificDeps2.Check
import PackageTests.BuildDeps.TargetSpecificDeps3.Check
import PackageTests.PathsModule.Executable.Check
import PackageTests.PathsModule.Library.Check
import PackageTests.PreProcess.Check
import PackageTests.TemplateHaskell.Check
import PackageTests.TestOptions.Check
import PackageTests.TestStanza.Check
......@@ -50,6 +51,7 @@ tests version =
-- PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.Check.suite
, hunit "BuildDeps/InternalLibrary0"
(PackageTests.BuildDeps.InternalLibrary0.Check.suite version)
, hunit "PreProcess" PackageTests.PreProcess.Check.suite
, hunit "TestStanza" PackageTests.TestStanza.Check.suite
-- ^ The Test stanza test will eventually be required
-- only for higher versions.
......
module PackageTests.PreProcess.Check (suite) where
import PackageTests.PackageTester
(PackageSpec(..), assertBuildSucceeded, cabal_build)
import System.FilePath
import Test.HUnit
suite :: Test
suite = TestCase $ do
let spec = PackageSpec ("PackageTests" </> "PreProcess")
["--enable-tests", "--enable-benchmarks"]
result <- cabal_build spec
assertBuildSucceeded result
module Main where
import Foo
main :: IO ()
main = return ()
import Distribution.Simple
main = defaultMain
name: PreProcess
version: 0.1
license: BSD3
author: Johan Tibell
stability: stable
category: PackageTests
build-type: Simple
Cabal-version: >= 1.2
description:
Check that preprocessors are run.
Library
exposed-modules: Foo
build-depends: base
Executable my-executable
main-is: Main.hs
other-modules: Foo
build-depends: base
Test-Suite my-test-suite
main-is: Main.hs
type: exitcode-stdio-1.0
other-modules: Foo
build-depends: base
Benchmark my-benchmark
main-is: Main.hs
type: exitcode-stdio-1.0
other-modules: Foo
build-depends: base
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