Commit edb7a742 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #3374 from grayjay/sandbox-reinstalls-test

Test reinstalling modified add-source dependencies
parents 6defdb50 3e433785
......@@ -88,6 +88,11 @@ Extra-Source-Files:
tests/IntegrationTests/regression/t3199/Main.hs
tests/IntegrationTests/regression/t3199/Setup.hs
tests/IntegrationTests/regression/t3199/test-3199.cabal
tests/IntegrationTests/sandbox-reinstalls/p/Main.hs
tests/IntegrationTests/sandbox-reinstalls/p/p.cabal
tests/IntegrationTests/sandbox-reinstalls/q/Q.hs
tests/IntegrationTests/sandbox-reinstalls/q/q.cabal
tests/IntegrationTests/sandbox-reinstalls/reinstall-modified-source.sh
tests/IntegrationTests/sandbox-sources/fail_removing_source_thats_not_registered.err
tests/IntegrationTests/sandbox-sources/fail_removing_source_thats_not_registered.sh
tests/IntegrationTests/sandbox-sources/p/Setup.hs
......
import Q (message)
main :: IO ()
main = putStrLn message
name: p
version: 1.0
build-type: Simple
cabal-version: >= 1.2
executable p
main-is: Main.hs
build-depends: q, base
module Q where
message :: String
message = "message"
name: q
version: 1.0
build-type: Simple
cabal-version: >= 1.2
library
build-depends: base
exposed-modules: Q
. ./common.sh
cd p
cabal sandbox init
cabal sandbox add-source ../q
cabal install --only-dependencies
cabal run p -v0 | grep -q '^message$' \
|| die "Expected \"message\" in p's output."
sleep 1
# Append to the string that p imports from q and prints:
echo ' ++ " updated"' >> ../q/Q.hs
cabal run p -v0 | grep -q '^message updated$' \
|| die "Expected \"message updated\" in p's output."
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment