summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_fail
diff options
context:
space:
mode:
authorDave Laing <dave.laing.80@gmail.com>2017-05-15 16:09:11 -0400
committerBen Gamari <ben@smart-cactus.org>2017-05-15 17:50:56 -0400
commit49012ebc9ed44a0b1f8de3781e15c8115d3074f8 (patch)
tree2810e77007cc68dcc21789946cd347fd0e13d8d8 /testsuite/tests/parser/should_fail
parentbc066558e83bfa741a58ec1797ac8fccc507266e (diff)
downloadhaskell-49012ebc9ed44a0b1f8de3781e15c8115d3074f8.tar.gz
Print warnings on parser failures (#12610).
Test Plan: validate Reviewers: austin, bgamari, simonmar, mpickering Reviewed By: mpickering Subscribers: mpickering, rwbarton, thomie GHC Trac Issues: #12610 Differential Revision: https://phabricator.haskell.org/D3584
Diffstat (limited to 'testsuite/tests/parser/should_fail')
-rw-r--r--testsuite/tests/parser/should_fail/T12610.hs6
-rw-r--r--testsuite/tests/parser/should_fail/T12610.stderr6
-rw-r--r--testsuite/tests/parser/should_fail/all.T3
3 files changed, 14 insertions, 1 deletions
diff --git a/testsuite/tests/parser/should_fail/T12610.hs b/testsuite/tests/parser/should_fail/T12610.hs
new file mode 100644
index 0000000000..7911c9926b
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T12610.hs
@@ -0,0 +1,6 @@
+{-# OPTIONS -fwarn-tabs #-}
+module T12610 where
+
+p = let x = 4
+ y = 5
+ in 12
diff --git a/testsuite/tests/parser/should_fail/T12610.stderr b/testsuite/tests/parser/should_fail/T12610.stderr
new file mode 100644
index 0000000000..29d9b26cf2
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T12610.stderr
@@ -0,0 +1,6 @@
+
+T12610.hs:5:1: warning: [-Wtabs (in -Wdefault)]
+ Tab character found here.
+ Please use spaces instead.
+
+T12610.hs:5:9: parse error on input ‘y’
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index 883e0b2efa..abe3da9775 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -55,7 +55,7 @@ test('T3153', normal, compile_fail, [''])
test('T3751', normal, compile_fail, [''])
test('position001', normal, compile_fail, [''])
-test('position002', normal, compile_fail, [''])
+test('position002', normal, compile_fail, ['-Wno-tabs'])
test('T1344a', normal, compile_fail, [''])
test('T1344b', normal, compile_fail, [''])
@@ -101,3 +101,4 @@ test('T13414', literate, compile_fail, [''])
test('T8501a', normal, compile_fail, [''])
test('T8501b', normal, compile_fail, [''])
test('T8501c', normal, compile_fail, [''])
+test('T12610', normal, compile_fail, [''])