summaryrefslogtreecommitdiff
path: root/testsuite/tests/package
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-08-22 15:05:29 +0100
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-08-22 15:06:14 +0100
commit27195265e2a9fc4451dffa44da3e2641561e74b3 (patch)
treee79554ac4a5fc55284f3d18a86f05425275a8ab7 /testsuite/tests/package
parent4748f5936fe72d96edfa17b153dbfd84f2c4c053 (diff)
downloadhaskell-27195265e2a9fc4451dffa44da3e2641561e74b3.tar.gz
Normalise GHC version number to make tests less fragile.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'testsuite/tests/package')
-rw-r--r--testsuite/tests/package/all.T9
-rw-r--r--testsuite/tests/package/package06e.stderr4
-rw-r--r--testsuite/tests/package/package07e.stderr8
-rw-r--r--testsuite/tests/package/package08e.stderr8
4 files changed, 16 insertions, 13 deletions
diff --git a/testsuite/tests/package/all.T b/testsuite/tests/package/all.T
index cb30949124..f2dc9dc6fa 100644
--- a/testsuite/tests/package/all.T
+++ b/testsuite/tests/package/all.T
@@ -7,6 +7,9 @@ incr_ghc = '-package "ghc (HsTypes as MyHsTypes, HsUtils)" '
inc_ghc = '-package ghc '
hide_ghc = '-hide-package ghc '
+def normaliseGhcVersion(str):
+ return re.sub('ghc-[0-9.]+', 'ghc-<VERSION>', str)
+
test('package01', normal, compile, [hide_all + incr_containers])
test('package01e', normal, compile_fail, [hide_all + incr_containers])
test('package02', normal, compile, [hide_all + inc_containers + incr_containers])
@@ -14,8 +17,8 @@ test('package03', normal, compile, [hide_all + incr_containers + inc_conta
test('package04', normal, compile, [incr_containers])
test('package05', normal, compile, [incr_ghc + inc_ghc])
test('package06', normal, compile, [incr_ghc])
-test('package06e', normal, compile_fail, [incr_ghc])
-test('package07e', normal, compile_fail, [incr_ghc + inc_ghc + hide_ghc])
-test('package08e', normal, compile_fail, [incr_ghc + hide_ghc])
+test('package06e', normalise_errmsg_fun(normaliseGhcVersion), compile_fail, [incr_ghc])
+test('package07e', normalise_errmsg_fun(normaliseGhcVersion), compile_fail, [incr_ghc + inc_ghc + hide_ghc])
+test('package08e', normalise_errmsg_fun(normaliseGhcVersion), compile_fail, [incr_ghc + hide_ghc])
test('package09e', normal, compile_fail, ['-package "containers (Data.Map as M, Data.Set as M)"'])
test('package10', normal, compile, ['-hide-all-packages -package "ghc (UniqFM as Prelude)" '])
diff --git a/testsuite/tests/package/package06e.stderr b/testsuite/tests/package/package06e.stderr
index 05894ee119..1cb27e342c 100644
--- a/testsuite/tests/package/package06e.stderr
+++ b/testsuite/tests/package/package06e.stderr
@@ -1,10 +1,10 @@
package06e.hs:2:1:
Failed to load interface for ‘HsTypes’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
package06e.hs:3:1:
Failed to load interface for ‘UniqFM’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/package/package07e.stderr b/testsuite/tests/package/package07e.stderr
index 40eaa063e2..0e4a0407ca 100644
--- a/testsuite/tests/package/package07e.stderr
+++ b/testsuite/tests/package/package07e.stderr
@@ -2,20 +2,20 @@
package07e.hs:2:1:
Failed to load interface for ‘MyHsTypes’
Perhaps you meant
- HsTypes (needs flag -package-key ghc-7.9.20140821)
+ HsTypes (needs flag -package-key ghc-<VERSION>)
Use -v to see a list of the files searched for.
package07e.hs:3:1:
Failed to load interface for ‘HsTypes’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
package07e.hs:4:1:
Failed to load interface for ‘HsUtils’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
package07e.hs:5:1:
Failed to load interface for ‘UniqFM’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/package/package08e.stderr b/testsuite/tests/package/package08e.stderr
index 7b5c2a848e..975b4b9873 100644
--- a/testsuite/tests/package/package08e.stderr
+++ b/testsuite/tests/package/package08e.stderr
@@ -2,20 +2,20 @@
package08e.hs:2:1:
Failed to load interface for ‘MyHsTypes’
Perhaps you meant
- HsTypes (needs flag -package-key ghc-7.9.20140821)
+ HsTypes (needs flag -package-key ghc-<VERSION>)
Use -v to see a list of the files searched for.
package08e.hs:3:1:
Failed to load interface for ‘HsTypes’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
package08e.hs:4:1:
Failed to load interface for ‘HsUtils’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.
package08e.hs:5:1:
Failed to load interface for ‘UniqFM’
- It is a member of the hidden package ‘ghc-7.9.20140821’.
+ It is a member of the hidden package ‘ghc-<VERSION>’.
Use -v to see a list of the files searched for.