diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-11-22 13:39:46 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-11-23 01:07:29 -0500 |
commit | 1ed2aa90da7973283408a8a121103d596b05f81b (patch) | |
tree | 9b28d6e1d94b9b6e1c1ef60db138785cdb8b6237 /testsuite/driver | |
parent | 680ef2c8eafa102d8ed5866d5ccf2872f5d0f269 (diff) | |
download | haskell-1ed2aa90da7973283408a8a121103d596b05f81b.tar.gz |
Don't include types in test output
Diffstat (limited to 'testsuite/driver')
-rw-r--r-- | testsuite/driver/testlib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index d4c8fc38f7..667d743e0b 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -800,20 +800,20 @@ def check_errmsg(needle): return "%s not contained in -ddump-simpl\n" % needle return normalise_errmsg_fun(norm) -# grep_errmsg(regex,[match_only]) -# If match_only = True we only check the part of the error +# grep_errmsg(regex,[groups]) +# If groups are given, return only the matched groups # that matches the regex. -def grep_errmsg(needle:str, match_only = False): +def grep_errmsg(needle:str, groups = None): def get_match(str:str): m = re.search(needle,str) if m: - return m.group(0) + return "".join([m.group(g) for g in groups if m.group(g) is not None]) else: return None def norm(str) -> str: - if not match_only: + if groups == None: return "".join( filter(lambda l: re.search(needle,l), str.splitlines(True))) else: |