Skip to content
Snippets Groups Projects
Commit 3d0f9be3 authored by Francesco Gazzetta's avatar Francesco Gazzetta
Browse files

Add test for data files in inplace dependencies

parent 7cfe2fb4
No related branches found
No related tags found
No related merge requests found
import LibFoo
main = putStrLn =<< LibFoo.getData
name: bar
version: 1.0
build-type: Simple
cabal-version: >= 1.10
executable bar
main-is: Main.hs
build-depends: base, foo
default-language: Haskell2010
......@@ -6,3 +6,14 @@ In order, the following will be built:
Configuring executable 'foo' for foo-1.0..
Preprocessing executable 'foo' for foo-1.0..
Building executable 'foo' for foo-1.0..
# cabal new-run
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- foo-1.0 (lib) (first run)
- bar-1.0 (exe:bar) (first run)
Configuring library for foo-1.0..
Preprocessing library for foo-1.0..
Building library for foo-1.0..
Configuring executable 'bar' for bar-1.0..
Preprocessing executable 'bar' for bar-1.0..
Building executable 'bar' for bar-1.0..
packages: foo
packages:
foo
bar
import Test.Cabal.Prelude
main = cabalTest $
main = cabalTest $ do
cabal' "new-run" ["foo"] >>= assertOutputContains "Hello World"
cabal' "new-run" ["bar"] >>= assertOutputContains "Hello World"
module LibFoo where
import Paths_foo
getData = readFile =<< getDataFileName "hello.txt"
......@@ -9,3 +9,11 @@ executable foo
main-is: Main.hs
build-depends: base
default-language: Haskell2010
library
exposed-modules: LibFoo
other-modules: Paths_foo
build-depends: base
default-language: Haskell2010
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment