summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-02-22 16:57:03 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-02-22 17:02:32 +0000
commitdedf32848460c77d25a9e180e41fe8dd74ee49d1 (patch)
tree9c62174723e49388fcf43a1b9fc2842dec2269b9
parent78fbc3a364e85dc5f31f865f397cd4000294444f (diff)
downloadhaskell-wip/normalise-tests.tar.gz
testsuite: Normalise output of ghci011 and T7627wip/normalise-tests
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'])