summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/layout
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-12-05 14:36:31 +0000
committerIan Lynagh <igloo@earth.li>2009-12-05 14:36:31 +0000
commit44e336d397dc07247408c159594ee37b0cb8908e (patch)
treecd24272547f31f9522db8a60c8c6f59064a65282 /testsuite/tests/ghc-regress/layout
parentd9544b66fe76c5053a0b75e5011ef21a6a8a5051 (diff)
downloadhaskell-44e336d397dc07247408c159594ee37b0cb8908e.tar.gz
Add another layout test
Diffstat (limited to 'testsuite/tests/ghc-regress/layout')
-rw-r--r--testsuite/tests/ghc-regress/layout/Makefile2
-rw-r--r--testsuite/tests/ghc-regress/layout/all.T6
-rw-r--r--testsuite/tests/ghc-regress/layout/layout006.hs13
-rw-r--r--testsuite/tests/ghc-regress/layout/layout006.stdout4
4 files changed, 24 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-regress/layout/Makefile b/testsuite/tests/ghc-regress/layout/Makefile
index 27633089a5..ed9376a0f0 100644
--- a/testsuite/tests/ghc-regress/layout/Makefile
+++ b/testsuite/tests/ghc-regress/layout/Makefile
@@ -2,7 +2,7 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
-layout001 layout002 layout003 layout004 layout005: %:
+layout001 layout002 layout003 layout004 layout005 layout006: %:
$(RM) $*.hi $*.o
echo Running with -XNoAlternativeLayoutRule
-"$(TEST_HC)" -XNoAlternativeLayoutRule -c $*.hs 2>&1
diff --git a/testsuite/tests/ghc-regress/layout/all.T b/testsuite/tests/ghc-regress/layout/all.T
index 693512ce7d..417c5f4c74 100644
--- a/testsuite/tests/ghc-regress/layout/all.T
+++ b/testsuite/tests/ghc-regress/layout/all.T
@@ -29,3 +29,9 @@ test('layout005',
run_command,
['$MAKE -s --no-print-directory layout005'])
+test('layout006',
+ [extra_clean(['layout006.hi', 'layout006.o']),
+ only_compiler_types(['ghc'])],
+ run_command,
+ ['$MAKE -s --no-print-directory layout006'])
+
diff --git a/testsuite/tests/ghc-regress/layout/layout006.hs b/testsuite/tests/ghc-regress/layout/layout006.hs
new file mode 100644
index 0000000000..70eacb42cf
--- /dev/null
+++ b/testsuite/tests/ghc-regress/layout/layout006.hs
@@ -0,0 +1,13 @@
+
+module M where
+
+-- GHC's RdrHsSyn.lhs had a piece of code like this
+
+f :: IO ()
+f
+ | True = do
+ let x = ()
+ y = ()
+ return ()
+ | True = return ()
+
diff --git a/testsuite/tests/ghc-regress/layout/layout006.stdout b/testsuite/tests/ghc-regress/layout/layout006.stdout
new file mode 100644
index 0000000000..8027f8dd71
--- /dev/null
+++ b/testsuite/tests/ghc-regress/layout/layout006.stdout
@@ -0,0 +1,4 @@
+Running with -XNoAlternativeLayoutRule
+Running with -XAlternativeLayoutRule
+
+layout006.hs:12:2: parse error on input `|'