Add regression test for old parser issue #504
authorKevin Buhr <buhr@asaurus.net>
Tue, 7 May 2019 02:40:37 +0000 (21:40 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 14 May 2019 20:41:19 +0000 (16:41 -0400)
testsuite/tests/parser/should_compile/T504.hs [new file with mode: 0644]
testsuite/tests/parser/should_compile/all.T

diff --git a/testsuite/tests/parser/should_compile/T504.hs b/testsuite/tests/parser/should_compile/T504.hs
new file mode 100644 (file)
index 0000000..bf31538
--- /dev/null
@@ -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
index 4fdc359..fdb35c4 100644 (file)
@@ -143,3 +143,4 @@ test('T15675', normal, compile, [''])
 test('T15781', normal, compile, [''])
 test('T16339', normal, compile, [''])
 test('T16619', [], multimod_compile, ['T16619', '-v0'])
 test('T15781', normal, compile, [''])
 test('T16339', normal, compile, [''])
 test('T16619', [], multimod_compile, ['T16619', '-v0'])
+test('T504', normal, compile, [''])