Skip to content

Commit

Permalink
Add a test for haskell#1241.
Browse files Browse the repository at this point in the history
  • Loading branch information
23Skidoo committed Mar 21, 2013
1 parent 7c3ea67 commit 887dccb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cabal/tests/PackageTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import PackageTests.PathsModule.Library.Check
import PackageTests.PreProcess.Check
import PackageTests.TemplateHaskell.Check
import PackageTests.CMain.Check
import PackageTests.EmptyLib.Check
import PackageTests.TestOptions.Check
import PackageTests.TestStanza.Check
import PackageTests.TestSuiteExeV10.Check
Expand Down Expand Up @@ -74,6 +75,8 @@ tests version =
, hunit "PathsModule/Executable"
PackageTests.PathsModule.Executable.Check.suite
, hunit "PathsModule/Library" PackageTests.PathsModule.Library.Check.suite
, hunit "EmptyLib/emptyLib"
PackageTests.EmptyLib.Check.emptyLib
] ++
-- These tests are only required to pass on cabal version >= 1.7
(if version >= Version [1, 7] []
Expand Down Expand Up @@ -104,4 +107,3 @@ main = do
-- Create a shared Setup executable to speed up Simple tests
compileSetup "."
defaultMain (tests cabalVersion)

13 changes: 13 additions & 0 deletions Cabal/tests/PackageTests/EmptyLib/Check.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module PackageTests.EmptyLib.Check where

import PackageTests.PackageTester
import System.FilePath
import Test.HUnit

-- See https://github.com/haskell/cabal/issues/1241
emptyLib :: Test
emptyLib = TestCase $ do
let spec = PackageSpec ("PackageTests" </> "EmptyLib"
</> "empty") []
result <- cabal_build spec
assertBuildSucceeded result
6 changes: 6 additions & 0 deletions Cabal/tests/PackageTests/EmptyLib/empty/empty.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: emptyLib
Cabal-version: >= 1.2
version: 1.0
build-type: Simple

Library

0 comments on commit 887dccb

Please sign in to comment.