shaker-0.1: testsuite/tests/Shaker/Action/CompileTest.hs
module Shaker.Action.CompileTest
where
import Shaker.Action.Compile
import Test.HUnit
import System.Directory
import Shaker.Config
import Control.Monad.Reader
import Shaker.Type
testRunCompileProject :: Test
testRunCompileProject = TestCase $
runReaderT runCompile testInputShaker >>
getDirectoryContents "target/Shaker" >>= \cont ->
doesFileExist "target/Shaker/Action/CompileTest.o" >>= \ex ->
doesFileExist "target/Shaker/Action/CompileTest.hi" >>= \ex2 ->
assertBool ("File .o and hi should exists "++ show cont) (ex && ex2)
testInputShaker :: ShakerInput
testInputShaker = defaultInput {
compileInputs = [defaultCompileInput {
cfCommandLineFlags = ["-package ghc"]
}]
}