Gather all hs-source-dirs to check test modules in sub-directories

This commit is contained in:
eagletmt
2013-03-15 17:30:21 +09:00
parent 8d7b0d365b
commit 24ada2abeb
8 changed files with 51 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
name: check-test-subdir
version: 0.1.0
build-type: Simple
cabal-version: >= 1.8
library
build-depends: base == 4.*
hs-source-dirs: src
exposed-modules: Check.Test.Subdir
test-suite test
type: exitcode-stdio-1.0
build-depends: base == 4.*
hs-source-dirs: test
main-is: Main.hs

View File

@@ -0,0 +1,4 @@
module Check.Test.Subdir (subdir) where
subdir :: String
subdir = "subdir"

View File

@@ -0,0 +1,5 @@
module Bar.Baz (baz) where
import Foo (foo)
baz :: String
baz = unwords [foo, "baz"]

View File

@@ -0,0 +1,3 @@
module Foo (foo) where
foo = "foo"

View File

@@ -0,0 +1,5 @@
module Main where
import Bar.Baz (baz)
main :: IO ()
main = putStrLn baz