summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/parser/should_compile/T504.hs11
-rw-r--r--testsuite/tests/parser/should_compile/all.T1
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_compile/T504.hs b/testsuite/tests/parser/should_compile/T504.hs
new file mode 100644
index 0000000000..bf315388df
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T504.hs
@@ -0,0 +1,11 @@
+{-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
+module Bug where
+
+-- regression test for #504:
+-- the pragma start and end sequences can both start in column 1
+-- without parse error
+
+{-# RULES
+ "foo" foo 1 = 1
+#-}
+foo 1 = 1
diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T
index 4fdc359f13..fdb35c4d58 100644
--- a/testsuite/tests/parser/should_compile/all.T
+++ b/testsuite/tests/parser/should_compile/all.T
@@ -143,3 +143,4 @@ test('T15675', normal, compile, [''])
test('T15781', normal, compile, [''])
test('T16339', normal, compile, [''])
test('T16619', [], multimod_compile, ['T16619', '-v0'])
+test('T504', normal, compile, [''])