Add testcase for #5976.
authorPaolo Capriotti <p.capriotti@gmail.com>
Fri, 30 Mar 2012 11:46:52 +0000 (12:46 +0100)
committerPaolo Capriotti <p.capriotti@gmail.com>
Tue, 3 Apr 2012 10:43:43 +0000 (11:43 +0100)
testsuite/tests/th/T5976.hs [new file with mode: 0644]
testsuite/tests/th/T5976.stderr [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T5976.hs b/testsuite/tests/th/T5976.hs
new file mode 100644 (file)
index 0000000..aa388c7
--- /dev/null
@@ -0,0 +1,3 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+$( error ("foo " ++ error "bar") )
diff --git a/testsuite/tests/th/T5976.stderr b/testsuite/tests/th/T5976.stderr
new file mode 100644 (file)
index 0000000..64cf33a
--- /dev/null
@@ -0,0 +1,5 @@
+
+T5976.hs:1:1:
+    Exception when trying to run compile-time code:
+      bar
+      Code: error ((++) "foo " error "bar")
index b428fca..fbe54f9 100644 (file)
@@ -232,3 +232,4 @@ test('T5984', extra_clean(['T5984_Lib.hi', 'T5984_Lib.o']),
               multimod_compile, ['T5984', '-v0 -ddump-splices'])
 test('T5555', extra_clean(['T5555_Lib.hi', 'T5555_Lib.o']),
               multimod_compile, ['T5555', '-v0'])
+test('T5976', normal, compile_fail, ['-v0'])