[commit: testsuite] master: Fix Check09 test; it depended on the exact version number of bytestring (ed277e0)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ed277e0c127b9dd97da7e02d7bf4e82baea47d29

>---------------------------------------------------------------

commit ed277e0c127b9dd97da7e02d7bf4e82baea47d29
Author: Ian Lynagh <[email protected]>
Date:   Sat Nov 17 12:32:15 2012 +0000

    Fix Check09 test; it depended on the exact version number of bytestring

>---------------------------------------------------------------

 tests/safeHaskell/check/all.T |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tests/safeHaskell/check/all.T b/tests/safeHaskell/check/all.T
index 4cef8f8..ca6ba0f 100644
--- a/tests/safeHaskell/check/all.T
+++ b/tests/safeHaskell/check/all.T
@@ -7,6 +7,9 @@ def f( opts ):
 
 setTestOpts(f)
 
+def normaliseBytestringPackage(str):
+    return re.sub('bytestring-[0-9]+(\.[0-9]+)*', 'bytestring-<VERSION>', str)
+
 test('CheckA', normal, compile, [''])
 test('CheckB',
      extra_clean(['CheckB_Aux.hi', 'CheckB_Aux.o']),
@@ -58,7 +61,10 @@ test('Check08',
      multimod_compile_fail, ['Check08', ''])
 
 # check -distrust-all-packages flag works
-test('Check09', normal, compile_fail, ['-fpackage-trust -distrust-all-packages'])
+test('Check09',
+     normalise_errmsg_fun(normaliseBytestringPackage),
+     compile_fail,
+     ['-fpackage-trust -distrust-all-packages'])
 
 # as above but trust this time
 test('Check10', normal, compile,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.