summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/multipleHomeUnits/th-deps
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/driver/multipleHomeUnits/th-deps')
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/all.T1
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/multipleHomeUnits_th-deps.stderr4
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/p1/P.hs3
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/p2/P.hs4
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/q/Q.hs9
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/unitP11
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/unitP21
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/unitQ1
8 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T b/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T
new file mode 100644
index 0000000000..4e89f8b296
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T
@@ -0,0 +1 @@
+test('multipleHomeUnits_th-deps', [extra_files([ 'p1/', 'p2', 'q', 'unitP1', 'unitP2', 'unitQ'])], multiunit_compile, [['unitP1', 'unitP2', 'unitQ'], '-fhide-source-paths'])
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/multipleHomeUnits_th-deps.stderr b/testsuite/tests/driver/multipleHomeUnits/th-deps/multipleHomeUnits_th-deps.stderr
new file mode 100644
index 0000000000..90fe8f8f3b
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/multipleHomeUnits_th-deps.stderr
@@ -0,0 +1,4 @@
+[1 of 3] Compiling P[p1-0]
+[2 of 3] Compiling P[p2-0]
+[3 of 3] Compiling Q[q-0]
+2
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/p1/P.hs b/testsuite/tests/driver/multipleHomeUnits/th-deps/p1/P.hs
new file mode 100644
index 0000000000..8a802e691f
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/p1/P.hs
@@ -0,0 +1,3 @@
+module P where
+
+p = 1
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/p2/P.hs b/testsuite/tests/driver/multipleHomeUnits/th-deps/p2/P.hs
new file mode 100644
index 0000000000..13c0fbabec
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/p2/P.hs
@@ -0,0 +1,4 @@
+-- The same as the module in p1, but doesn't contain an instance
+module P where
+
+p = 2
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/q/Q.hs b/testsuite/tests/driver/multipleHomeUnits/th-deps/q/Q.hs
new file mode 100644
index 0000000000..2ede07e858
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/q/Q.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE PackageImports #-}
+{-# LANGUAGE TemplateHaskell #-}
+module Q where
+
+import "p2" P
+import Control.Monad.IO.Class
+import System.IO
+
+q = $(liftIO (print p >> hFlush stdout) >> [| () |])
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/unitP1 b/testsuite/tests/driver/multipleHomeUnits/th-deps/unitP1
new file mode 100644
index 0000000000..785cdd963d
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/unitP1
@@ -0,0 +1 @@
+-working-dir p1 P -this-unit-id p1-0 -this-package-name p1
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/unitP2 b/testsuite/tests/driver/multipleHomeUnits/th-deps/unitP2
new file mode 100644
index 0000000000..26d789c44f
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/unitP2
@@ -0,0 +1 @@
+-working-dir p2 P -this-unit-id p2-0 -this-package-name p2
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/unitQ b/testsuite/tests/driver/multipleHomeUnits/th-deps/unitQ
new file mode 100644
index 0000000000..7c7422014c
--- /dev/null
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/unitQ
@@ -0,0 +1 @@
+-working-dir q Q -this-unit-id q-0 -this-package-name q -package-id p1-0 -package-id p2-0