summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-11-01 21:56:52 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2011-11-01 21:57:32 +0000
commit41b7d054c26f4733db5b0eea850c5513f810f1e9 (patch)
treee741064faef481f19c0a992aaf519a8e1c146e21 /testsuite/tests/rename/should_compile
parent8ece5ced061b88967efe3713769aeb1a86e70637 (diff)
downloadhaskell-41b7d054c26f4733db5b0eea850c5513f810f1e9.tar.gz
Test Trac #5592
Diffstat (limited to 'testsuite/tests/rename/should_compile')
-rw-r--r--testsuite/tests/rename/should_compile/T5592.hs9
-rw-r--r--testsuite/tests/rename/should_compile/T5592.stdout1
-rw-r--r--testsuite/tests/rename/should_compile/T5592a.hs4
-rw-r--r--testsuite/tests/rename/should_compile/all.T5
4 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T5592.hs b/testsuite/tests/rename/should_compile/T5592.hs
new file mode 100644
index 0000000000..7f03757814
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5592.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE RecordWildCards #-}
+module Main where
+
+import qualified T5592a as MR (MyRecord(MyRecord, field))
+
+main
+ = do { let field = "Hello, world!"
+ rec = MR.MyRecord {..}
+ ; print rec }
diff --git a/testsuite/tests/rename/should_compile/T5592.stdout b/testsuite/tests/rename/should_compile/T5592.stdout
new file mode 100644
index 0000000000..d58d2d8c52
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5592.stdout
@@ -0,0 +1 @@
+MyRecord {field = "Hello, world!"}
diff --git a/testsuite/tests/rename/should_compile/T5592a.hs b/testsuite/tests/rename/should_compile/T5592a.hs
new file mode 100644
index 0000000000..ba0e40b3f5
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5592a.hs
@@ -0,0 +1,4 @@
+module T5592a where
+
+data MyRecord = MyRecord { field :: String }
+ deriving (Show)
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 262f506bc6..3ed2a1fb0f 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -181,3 +181,8 @@ test('T5306',
'T5306b.hi', 'T5306b.o'])],
multimod_compile,
['T5306', '-v0'])
+test('T5592',
+ [only_compiler_types(['ghc']),
+ extra_clean(['T5592a.hi', 'T5592a.o'])],
+ multimod_compile_and_run,
+ ['T5592', '-v0'])