[commit: ghc] master: Test case for indirect dependencies in ghci linker (#10322) (88b8406)

git at git.haskell.org git at git.haskell.org
Sat Apr 18 18:05:24 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/88b84063c11a48820011805a8341d95f7fcd59db/ghc

>---------------------------------------------------------------

commit 88b84063c11a48820011805a8341d95f7fcd59db
Author: Reid Barton <rwbarton at gmail.com>
Date:   Wed Apr 15 16:46:47 2015 -0400

    Test case for indirect dependencies in ghci linker (#10322)


>---------------------------------------------------------------

88b84063c11a48820011805a8341d95f7fcd59db
 testsuite/tests/ghci/scripts/T10322.script                   | 5 +++++
 testsuite/tests/ghci/scripts/{T8696.stdout => T10322.stdout} | 1 +
 testsuite/tests/ghci/scripts/{T8696A.hs => T10322A.hs}       | 2 +-
 testsuite/tests/ghci/scripts/T10322B.hs                      | 4 ++++
 testsuite/tests/ghci/scripts/T10322C.hs                      | 5 +++++
 testsuite/tests/ghci/scripts/all.T                           | 2 ++
 6 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/ghci/scripts/T10322.script b/testsuite/tests/ghci/scripts/T10322.script
new file mode 100644
index 0000000..75f2a39
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10322.script
@@ -0,0 +1,5 @@
+:set -fobject-code
+:load T10322A T10322B T10322C
+T10322A.a
+T10322B.b
+T10322C.c
diff --git a/testsuite/tests/ghci/scripts/T8696.stdout b/testsuite/tests/ghci/scripts/T10322.stdout
similarity index 66%
copy from testsuite/tests/ghci/scripts/T8696.stdout
copy to testsuite/tests/ghci/scripts/T10322.stdout
index b944734..de9da6d 100644
--- a/testsuite/tests/ghci/scripts/T8696.stdout
+++ b/testsuite/tests/ghci/scripts/T10322.stdout
@@ -1,2 +1,3 @@
 3
 4
+7
diff --git a/testsuite/tests/ghci/scripts/T8696A.hs b/testsuite/tests/ghci/scripts/T10322A.hs
similarity index 57%
copy from testsuite/tests/ghci/scripts/T8696A.hs
copy to testsuite/tests/ghci/scripts/T10322A.hs
index 465af37..ba01fd2 100644
--- a/testsuite/tests/ghci/scripts/T8696A.hs
+++ b/testsuite/tests/ghci/scripts/T10322A.hs
@@ -1,4 +1,4 @@
-module T8696A (a) where
+module T10322A (a) where
 {-# NOINLINE a #-}
 a :: Int
 a = 3
diff --git a/testsuite/tests/ghci/scripts/T10322B.hs b/testsuite/tests/ghci/scripts/T10322B.hs
new file mode 100644
index 0000000..aa0b73a
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10322B.hs
@@ -0,0 +1,4 @@
+module T10322B (b) where
+import T10322A (a)
+b :: Int
+b = a+1
diff --git a/testsuite/tests/ghci/scripts/T10322C.hs b/testsuite/tests/ghci/scripts/T10322C.hs
new file mode 100644
index 0000000..b6ad6e9
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10322C.hs
@@ -0,0 +1,5 @@
+module T10322C (c) where
+import T10322A (a)
+import T10322B (b)
+c :: Int
+c = a+b
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index b97eede..01de663 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -207,3 +207,5 @@ test('T9878b',
       extra_clean(['T9878b.hi','T9878b.o'])],
     ghci_script, ['T9878b.script'])
 test('T10122', normal, ghci_script, ['T10122.script'])
+test('T10322', when(opsys('darwin'), expect_broken(10322)),
+    ghci_script, ['T10322.script'])



More information about the ghc-commits mailing list