summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-02-22 16:57:03 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-23 14:00:40 -0500
commitb6670af6283be8b60f4c33eff896a2bf2c1b5ca6 (patch)
treed7165fa3516f2fc85b9cac6ebf2b1d856be9fa77
parent818ff2ef76908499454ceed94329c133a1aad918 (diff)
downloadhaskell-b6670af6283be8b60f4c33eff896a2bf2c1b5ca6.tar.gz
testsuite: Normalise output of ghci011 and T7627
The outputs of these tests vary on the order interface files are loaded so we normalise the output to correct for these inconsequential differences. Fixes #21121
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T9
1 files changed, 7 insertions, 2 deletions
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 3745d30bf4..e35d3b804d 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -1,5 +1,9 @@
# coding=utf8
+def sort_output(str):
+ return '\n'.join(sorted(str.splitlines()))
+
+
# Note [Disabling ghci-leak-check]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The -fno-ghci-leak-check is because this test prints the current GHC settings
@@ -27,7 +31,8 @@ test('ghci009', combined_output, ghci_script, ['ghci009.script'])
# has a ^C handler installed.
test('ghci010', skip, ghci_script, ['ghci010.script'])
-test('ghci011', normal, ghci_script, ['ghci011.script'])
+#See #21121 for why this output is normalised.
+test('ghci011', [normalise_fun(sort_output)], ghci_script, ['ghci011.script'])
test('ghci012', normal, ghci_script, ['ghci012.script'])
test('ghci013', normal, ghci_script, ['ghci013.script'])
@@ -158,7 +163,7 @@ test('ghci058', [extra_files(['../shell.hs']),
ghci_script, ['ghci058.script'])
test('T7587', normal, ghci_script, ['T7587.script'])
test('T7688', normal, ghci_script, ['T7688.script'])
-test('T7627', normal, ghci_script, ['T7627.script'])
+test('T7627', [normalise_fun(sort_output)], ghci_script, ['T7627.script'])
test('T7627b', normal, ghci_script, ['T7627b.script'])
test('T7586', normal, ghci_script, ['T7586.script'])
test('T4175', normal, ghci_script, ['T4175.script'])