Test Trac #5592
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 1 Nov 2011 21:56:52 +0000 (21:56 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 1 Nov 2011 21:57:32 +0000 (21:57 +0000)
testsuite/tests/rename/should_compile/T5592.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/T5592.stdout [new file with mode: 0644]
testsuite/tests/rename/should_compile/T5592a.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/all.T

diff --git a/testsuite/tests/rename/should_compile/T5592.hs b/testsuite/tests/rename/should_compile/T5592.hs
new file mode 100644 (file)
index 0000000..7f03757
--- /dev/null
@@ -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 (file)
index 0000000..d58d2d8
--- /dev/null
@@ -0,0 +1 @@
+MyRecord {field = "Hello, world!"}\r
diff --git a/testsuite/tests/rename/should_compile/T5592a.hs b/testsuite/tests/rename/should_compile/T5592a.hs
new file mode 100644 (file)
index 0000000..ba0e40b
--- /dev/null
@@ -0,0 +1,4 @@
+module T5592a where
+
+data MyRecord = MyRecord { field :: String } 
+  deriving (Show)  
index 262f506..3ed2a1f 100644 (file)
@@ -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'])