[commit: testsuite] master: Add normalise_exe for removing ".exe" extensions in output on Windows (e79f0da)
Simon Marlow
marlowsd at gmail.com
Tue Jan 17 13:38:04 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/e79f0da0e9f6d0a8455354263747e9d2945aadd2
>---------------------------------------------------------------
commit e79f0da0e9f6d0a8455354263747e9d2945aadd2
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 4b905b6..76ec477 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -455,6 +455,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)
@@ -1587,6 +1590,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