Expect 4006 to fail on msys
authorIan Lynagh <igloo@earth.li>
Thu, 23 Jun 2011 14:28:49 +0000 (15:28 +0100)
committerIan Lynagh <igloo@earth.li>
Thu, 23 Jun 2011 14:56:54 +0000 (15:56 +0100)
In the 65001 codepage, we can't even cat the expected output on msys:
$ cat 4006.stdout
It works here
cat: write error: Permission denied

testsuite/driver/runtests.py
testsuite/driver/testlib.py
testsuite/tests/ghc-regress/lib/should_run/all.T

index 45bdd01..a6b0da5 100644 (file)
@@ -106,6 +106,14 @@ if config.use_threads == 1:
         print "Warning: Ignoring request to use threads as running on Windows"
         config.use_threads = 0
 
+config.cygwin = False
+config.msys = False
+if windows:
+    if cygwin:
+        config.cygwin = True
+    else:
+        config.msys = True
+
 # Try to use UTF8
 if windows:
     import ctypes
index 0dce28c..f48b86d 100644 (file)
@@ -278,6 +278,18 @@ def if_wordsize( ws, f ):
     else:
         return normal
 
+def if_msys( f ):
+    if config.msys:
+        return f
+    else:
+        return normal
+
+def if_cygwin( f ):
+    if config.cygwin:
+        return f
+    else:
+        return normal
+
 # ---
 
 def if_in_tree_compiler( f ):
index 388ad04..c0b7384 100644 (file)
@@ -57,4 +57,9 @@ test('stableptr005', normal, compile_and_run, [''])
 
 test('weak001', normal, compile_and_run, [''])
 
-test('4006',           normal, compile_and_run, [''])
+# In the 65001 codepage, we can't even cat the expected output on msys:
+# $ cat 4006.stdout
+# It works here
+# cat: write error: Permission denied
+test('4006', if_msys(expect_fail), compile_and_run, [''])
+