From 4fd62218b0c2191ab3c65c54ec8201c8ebd78605 Mon Sep 17 00:00:00 2001
From: Ben Gamari <bgamari.foss@gmail.com>
Date: Thu, 9 Jul 2015 09:39:30 -0400
Subject: [PATCH] Fix T2507 expected output

This seems to have been changed in
07282c7222d718e6d3df8d8f843d95d534dd7062 to include Unicode quotes
despite the fact that we explicitly set LC_ALL=C in the Makefile to
request standard ASCII output.
---
 testsuite/tests/driver/Makefile     | 4 ++++
 testsuite/tests/driver/T2507.stderr | 4 ++--
 testsuite/tests/driver/all.T        | 8 +++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile
index 4670958c9166..4418ba44ac39 100644
--- a/testsuite/tests/driver/Makefile
+++ b/testsuite/tests/driver/Makefile
@@ -550,6 +550,10 @@ T7130:
 T7563:
 	-"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -C T7563.hs
 
+# Below we set LC_ALL=C to request standard ASCII output in the resulting error
+# messagse. Unfortunately, Mac OS X still uses a Unicode encoding even with
+# LC_ALL=C, so we expect these tests to fail there.
+
 .PHONY: T6037
 T6037:
 	-LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T6037.hs
diff --git a/testsuite/tests/driver/T2507.stderr b/testsuite/tests/driver/T2507.stderr
index e4365a36b39c..925a8709ddaf 100644
--- a/testsuite/tests/driver/T2507.stderr
+++ b/testsuite/tests/driver/T2507.stderr
@@ -1,5 +1,5 @@
 
 T2507.hs:5:7:
-    Couldn't match expected type ‘Int’ with actual type ‘()’
+    Couldn't match expected type `Int' with actual type `()'
     In the expression: ()
-    In an equation for ‘foo’: foo = ()
+    In an equation for `foo': foo = ()
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index f236f6b5958a..a260a177b529 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -384,8 +384,14 @@ test('T7060',
 test('T7130', normal, compile_fail, ['-fflul-laziness'])
 test('T7563', when(unregisterised(), skip), run_command,
      ['$MAKE -s --no-print-directory T7563'])
-test('T6037', expect_broken(6037), run_command,
+
+test('T6037',
+     # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
+     [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail),
+      expect_broken(6037)],
+     run_command,
      ['$MAKE -s --no-print-directory T6037'])
+
 test('T2507',
      # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
      [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
-- 
GitLab