[commit: testsuite] ghc-7.4: Add normalise_exe for removing ".exe" extensions in output on Windows (7c96960)
Ian Lynagh
igloo at earth.li
Wed Jan 25 16:31:16 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : ghc-7.4
http://hackage.haskell.org/trac/ghc/changeset/7c96960614f1ab44f0fd5432949595d7ff4db9d4
>---------------------------------------------------------------
commit 7c96960614f1ab44f0fd5432949595d7ff4db9d4
Author: Simon Marlow <marlowsd at gmail.com>
Date: Mon Jan 16 15:10:02 2012 +0000
Add normalise_exe for removing ".exe" extensions in output on Windows
>---------------------------------------------------------------
driver/testlib.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/driver/testlib.py b/driver/testlib.py
index 746d122..529393b 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -447,6 +447,9 @@ def _compile_cmd_prefix( opts, prefix ):
def normalise_slashes( opts ):
opts.extra_normaliser = normalise_slashes_
+def normalise_exe( opts ):
+ opts.extra_normaliser = normalise_exe_
+
def normalise_fun( fun ):
return lambda opts, f=fun: _normalise_fun(opts, f)
@@ -1570,6 +1573,10 @@ def normalise_slashes_( str ):
str = re.sub('\\\\', '/', str)
return str
+def normalise_exe_( str ):
+ str = re.sub('\.exe', '', str)
+ return str
+
def normalise_output( str ):
# Remove a .exe extension (for Windows)
# This can occur in error messages generated by the program.
More information about the Cvs-ghc
mailing list