summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/prog005
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-01-12 11:40:09 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2014-01-12 12:47:17 +0100
commit66693401b98cb5aa912948af7bbd2182474f50c4 (patch)
treeab176320c561668c9ac13e684c9cc8ae6e4535f6 /testsuite/tests/ghci/prog005
parenta924debcbb3dc5c004f988fcc1b480a01ba276dd (diff)
parentad233cf68ea436c84e931c5bdb9f803308708e09 (diff)
downloadhaskell-66693401b98cb5aa912948af7bbd2182474f50c4.tar.gz
Fold testsuite.git into ghc.git (re #8545)
This commit performs a subtree merge of testsuite.git into ghc.git; The next commit will adapt `sync-all` et al. to the new situation. At the time of merge, testsuite.git was at commit [998a816ae89c4fd573f4abd7c6abb346cf7ee9af/testsuite] The following steps have been used to accomplish this merge: 1. Clone a fresh testsuite.git copy (& cd into) 2. Remove accidentally committed binary files from history git filter-branch \ --index-filter "git rm -r --cached --ignore-unmatch \ tests/haddock/should_compile_flag_nohaddock/a.out \ tests/haddock/should_compile_noflag_nohaddock/a.out \ tests/ghc-regress/haddock/should_compile_flag_nohaddock/a.out \ tests/ghc-regress/haddock/should_compile_noflag_nohaddock/a.out \ tests/ghc-regress/dph/diophantine/dph-diophantine-fast \ tests/ghc-regress/dph/diophantine/dph-diophantine-opt \ tests/ghc-regress/dph/primespj/dph-primespj-fast \ tests/ghc-regress/dph/quickhull/dph-quickhull-fast \ tests/ghc-regress/dph/smvm/dph-smvm \ tests/ghc-regress/dph/sumnats/dph-sumnats \ tests/ghc-regress/dph/words/dph-words-fast \ tests/ghc-regress/plugins/plugins01" \ HEAD 3. Rename all paths in testsuite.git to be prefixed with `testsuite/` git filter-branch -f --prune-empty --tree-filter \ "mkdir -p testsuite; \ git ls-tree --name-only \$GIT_COMMIT | xargs -I files mv files testsuite/" 4. cd into ghc/ checkout, and perform subtree merge of testsuite into ghc (see also http://nuclearsquid.com/writings/subtree-merging-and-you/) cd ../ghc/ git remote add -f testsuite ../testsuite/.git git merge -s ours --no-commit testsuite/master git read-tree --prefix=/ -u testsuite/master git commit Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'testsuite/tests/ghci/prog005')
-rw-r--r--testsuite/tests/ghci/prog005/A1.hs2
-rw-r--r--testsuite/tests/ghci/prog005/B.hs4
-rw-r--r--testsuite/tests/ghci/prog005/Makefile3
-rw-r--r--testsuite/tests/ghci/prog005/prog005.T2
-rw-r--r--testsuite/tests/ghci/prog005/prog005.script18
-rw-r--r--testsuite/tests/ghci/prog005/prog005.stdout2
6 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog005/A1.hs b/testsuite/tests/ghci/prog005/A1.hs
new file mode 100644
index 0000000000..e14d0ebe45
--- /dev/null
+++ b/testsuite/tests/ghci/prog005/A1.hs
@@ -0,0 +1,2 @@
+module A where
+x = 1 :: Int
diff --git a/testsuite/tests/ghci/prog005/B.hs b/testsuite/tests/ghci/prog005/B.hs
new file mode 100644
index 0000000000..57b34b2be2
--- /dev/null
+++ b/testsuite/tests/ghci/prog005/B.hs
@@ -0,0 +1,4 @@
+module B (y) where
+import A
+y = 2 :: Int
+z = 3 :: Int
diff --git a/testsuite/tests/ghci/prog005/Makefile b/testsuite/tests/ghci/prog005/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/ghci/prog005/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/ghci/prog005/prog005.T b/testsuite/tests/ghci/prog005/prog005.T
new file mode 100644
index 0000000000..4c44c6b266
--- /dev/null
+++ b/testsuite/tests/ghci/prog005/prog005.T
@@ -0,0 +1,2 @@
+test('prog005', extra_clean(['A.hs']), ghci_script, ['prog005.script'])
+
diff --git a/testsuite/tests/ghci/prog005/prog005.script b/testsuite/tests/ghci/prog005/prog005.script
new file mode 100644
index 0000000000..d720edbd0f
--- /dev/null
+++ b/testsuite/tests/ghci/prog005/prog005.script
@@ -0,0 +1,18 @@
+:unset +s
+:unset +t
+
+:!cp A1.hs A.hs
+:load B
+
+-- eval something that isn't exported from B
+z
+
+:!sleep 1
+:!touch A.hs
+:reload
+
+-- A should be recompiled, B will be skipped. We should still have
+-- the full top-level scope of B available, though. This was
+-- nearly broken in GHC 6.4
+z
+
diff --git a/testsuite/tests/ghci/prog005/prog005.stdout b/testsuite/tests/ghci/prog005/prog005.stdout
new file mode 100644
index 0000000000..a5c8806279
--- /dev/null
+++ b/testsuite/tests/ghci/prog005/prog005.stdout
@@ -0,0 +1,2 @@
+3
+3