summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/quasiquotation/Makefile4
-rw-r--r--testsuite/tests/quasiquotation/T14028.hs8
-rw-r--r--testsuite/tests/quasiquotation/T14028C.c5
-rw-r--r--testsuite/tests/quasiquotation/T14028Quote.hs6
-rw-r--r--testsuite/tests/quasiquotation/all.T4
5 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/Makefile b/testsuite/tests/quasiquotation/Makefile
index 8e2e7e7c78..ebc91d23e5 100644
--- a/testsuite/tests/quasiquotation/Makefile
+++ b/testsuite/tests/quasiquotation/Makefile
@@ -9,3 +9,7 @@ T4150:
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T4150A.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T4150.hs
+T14028:
+ '$(TEST_HC)' $(TEST_HC_OPTS) T14028Quote.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T14028C.c
+ '$(TEST_HC)' $(TEST_HC_OPTS) -fexternal-interpreter T14028 T14028C.o
diff --git a/testsuite/tests/quasiquotation/T14028.hs b/testsuite/tests/quasiquotation/T14028.hs
new file mode 100644
index 0000000000..5313df6e77
--- /dev/null
+++ b/testsuite/tests/quasiquotation/T14028.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE QuasiQuotes #-}
+
+import T14028Quote
+
+s :: String
+s = [here|goes nothing|]
+
+main = putStrLn s
diff --git a/testsuite/tests/quasiquotation/T14028C.c b/testsuite/tests/quasiquotation/T14028C.c
new file mode 100644
index 0000000000..0115013d70
--- /dev/null
+++ b/testsuite/tests/quasiquotation/T14028C.c
@@ -0,0 +1,5 @@
+#include <stdio.h>
+
+void hi() {
+ puts("Hello, World!");
+}
diff --git a/testsuite/tests/quasiquotation/T14028Quote.hs b/testsuite/tests/quasiquotation/T14028Quote.hs
new file mode 100644
index 0000000000..01413ec100
--- /dev/null
+++ b/testsuite/tests/quasiquotation/T14028Quote.hs
@@ -0,0 +1,6 @@
+module T14028Quote where
+import Language.Haskell.TH
+import Language.Haskell.TH.Quote
+
+here :: QuasiQuoter
+here = QuasiQuoter { quoteExp = litE . stringL }
diff --git a/testsuite/tests/quasiquotation/all.T b/testsuite/tests/quasiquotation/all.T
index 84d25f8bdd..a10b8e4446 100644
--- a/testsuite/tests/quasiquotation/all.T
+++ b/testsuite/tests/quasiquotation/all.T
@@ -6,3 +6,7 @@ test('T7918',
[req_interp, extra_run_opts('"' + config.libdir + '"'),
only_ways(config.ghc_th_way), unless(have_dynamic(), skip)],
compile_and_run, ['-package ghc ' + config.ghc_th_way_flags])
+test('T14028',
+ [req_interp, only_ways(config.ghc_th_way)],
+ run_command,
+ ['$MAKE -s --no-print-directory T14028'])