summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-02 13:04:26 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-02 21:13:03 -0400
commit60307cb85abc8d53845598a430c0ee9264fb2d82 (patch)
tree70d7567408b12416b37637188ef17f26cece2514 /testsuite/driver/testlib.py
parent852a43f360af09416d15777c8f10d704b5423a96 (diff)
downloadhaskell-60307cb85abc8d53845598a430c0ee9264fb2d82.tar.gz
array: Clear up inconsistency in T9220 output
ghc-8.2 and master disagreed on the order of the instances. Normalise this difference away. Updates array submodule.
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 7dedb33948..a5da1e9567 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -493,6 +493,13 @@ def no_check_hp(name, opts):
# ----
+def filter_stdout_lines( regex ):
+ """ Filter lines of stdout with the given regular expression """
+ import re
+ def f( name, opts ):
+ _normalise_fun(name, opts, lambda s: '\n'.join(re.findall(regex, s)))
+ return f
+
def normalise_slashes( name, opts ):
_normalise_fun(name, opts, normalise_slashes_)