diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2020-09-18 16:19:09 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-20 20:30:57 -0400 |
commit | caf6a5a30291d80660d6ff73efc35c04eaced789 (patch) | |
tree | 3a34c652695f541ba419b47f959f3746ea657c5b | |
parent | ea08aead19087d21c5f7334e192cd4016ae57462 (diff) | |
download | haskell-caf6a5a30291d80660d6ff73efc35c04eaced789.tar.gz |
testsuite: Fix WinIO error message normalization
This wasn't being applied to stderr.
-rw-r--r-- | testsuite/driver/testlib.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 104d3345b3..15bcdde0eb 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -751,22 +751,24 @@ def normalise_win32_io_errors(name, opts): slightly in the error messages that they provide. Normalise these differences away, preferring the new WinIO errors. - This can be dropped when the old IO manager is removed. + This normalization can be dropped when the old IO manager is removed. """ SUBS = [ - ('Bad file descriptor', 'The handle is invalid'), + ('Bad file descriptor', 'The handle is invalid.'), ('Permission denied', 'Access is denied.'), ('No such file or directory', 'The system cannot find the file specified.'), ] - def f(s: str): + def normalizer(s: str) -> str: for old,new in SUBS: s = s.replace(old, new) return s - return when(opsys('mingw32'), normalise_fun(f)) + if opsys('mingw32'): + _normalise_fun(name, opts, normalizer) + _normalise_errmsg_fun(name, opts, normalizer) def normalise_version_( *pkgs ): def normalise_version__( str ): |