[commit: testsuite] master: Add testcase for #5976. (3816e8f)
Paolo Capriotti
p.capriotti at gmail.com
Tue Apr 3 12:43:59 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3816e8f1f14450b874a29d1cefbf8b708232d57d
>---------------------------------------------------------------
commit 3816e8f1f14450b874a29d1cefbf8b708232d57d
Author: Paolo Capriotti <p.capriotti at gmail.com>
Date: Fri Mar 30 12:46:52 2012 +0100
Add testcase for #5976.
>---------------------------------------------------------------
tests/th/T5976.hs | 3 +++
tests/th/T5976.stderr | 5 +++++
tests/th/all.T | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/tests/th/T5976.hs b/tests/th/T5976.hs
new file mode 100644
index 0000000..aa388c7
--- /dev/null
+++ b/tests/th/T5976.hs
@@ -0,0 +1,3 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+$( error ("foo " ++ error "bar") )
diff --git a/tests/th/T5976.stderr b/tests/th/T5976.stderr
new file mode 100644
index 0000000..64cf33a
--- /dev/null
+++ b/tests/th/T5976.stderr
@@ -0,0 +1,5 @@
+
+T5976.hs:1:1:
+ Exception when trying to run compile-time code:
+ bar
+ Code: error ((++) "foo " error "bar")
diff --git a/tests/th/all.T b/tests/th/all.T
index b428fca..fbe54f9 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -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'])
More information about the Cvs-ghc
mailing list