Skip to content

Commit

Permalink
test case for buildinfo with multiple executables
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxPolice committed Apr 8, 2006
1 parent 855cf93 commit 7b042d2
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/ModuleTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,19 @@ tests currDir comp compConf = [
assertCmd "./,tmp/bin/testA isA" "A is not A"
assertCmd "./,tmp/bin/testB isB" "B is not B"
-- no register, since there's no library
-- buildinfo
,TestLabel ("buildinfo with multiple executables " ++ compIdent) $ TestCase $
do setCurrentDirectory $ (testdir `joinFileName` "buildInfo")
testPrelude
assertConfigure ",tmp"
assertCmd' compCmd "haddock" "setup haddock returned error code."
assertBuild
assertCopy
doesFileExist ",tmp/bin/exe1" >>=
assertBool "install did not create the executable: exe1"
doesFileExist ",tmp/bin/exe2" >>=
assertBool "install did not create the executable: exe2"
-- no register, since there's no library
-- mutually recursive modules
,TestLabel ("package recursive: building " ++ compIdent) $ TestCase $
when (comp == GHC) (do
Expand Down
1 change: 1 addition & 0 deletions tests/buildInfo/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../Tests.mk
5 changes: 5 additions & 0 deletions tests/buildInfo/Setup.lhs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/runhaskell

> import Distribution.Simple
> main = defaultMainWithHooks defaultUserHooks

5 changes: 5 additions & 0 deletions tests/buildInfo/buildinfo2.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Executable: exe1
Buildable: True

Executable: exe2
Buildable: True
19 changes: 19 additions & 0 deletions tests/buildInfo/buildinfo2.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Name: buildinfo2
Version: 0.0
License: GPL
License-file: COPYING
Build-Depends: base
Author: Evgeny Chukreev
Copyright: Evgeny Chukreev (C) 2005
Maintainer: Evgeny Chukreev <public@toril.ru>
Synopsis: Buildinfo testcase
Description:
Buildinfo testcase

Executable: exe1
Main-is: exe1.hs
HS-source-dirs: src

Executable: exe2
Main-is: exe2.hs
HS-source-dirs: src
4 changes: 4 additions & 0 deletions tests/buildInfo/src/exe1.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Main () where

main :: IO ()
main = return ()
4 changes: 4 additions & 0 deletions tests/buildInfo/src/exe2.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Main () where

main :: IO ()
main = return ()

0 comments on commit 7b042d2

Please sign in to comment.