Gather all hs-source-dirs to check test modules in sub-directories
This commit is contained in:
15
test/data/check-test-subdir/check-test-subdir.cabal
Normal file
15
test/data/check-test-subdir/check-test-subdir.cabal
Normal 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
|
||||
4
test/data/check-test-subdir/src/Check/Test/Subdir.hs
Normal file
4
test/data/check-test-subdir/src/Check/Test/Subdir.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
module Check.Test.Subdir (subdir) where
|
||||
|
||||
subdir :: String
|
||||
subdir = "subdir"
|
||||
5
test/data/check-test-subdir/test/Bar/Baz.hs
Normal file
5
test/data/check-test-subdir/test/Bar/Baz.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
module Bar.Baz (baz) where
|
||||
import Foo (foo)
|
||||
|
||||
baz :: String
|
||||
baz = unwords [foo, "baz"]
|
||||
3
test/data/check-test-subdir/test/Foo.hs
Normal file
3
test/data/check-test-subdir/test/Foo.hs
Normal file
@@ -0,0 +1,3 @@
|
||||
module Foo (foo) where
|
||||
|
||||
foo = "foo"
|
||||
5
test/data/check-test-subdir/test/Main.hs
Normal file
5
test/data/check-test-subdir/test/Main.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
module Main where
|
||||
import Bar.Baz (baz)
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn baz
|
||||
Reference in New Issue
Block a user