Make some tests independent of the version number of the array package
authorIan Lynagh <ian@well-typed.com>
Fri, 30 Nov 2012 18:41:32 +0000 (18:41 +0000)
committerIan Lynagh <ian@well-typed.com>
Fri, 30 Nov 2012 18:41:32 +0000 (18:41 +0000)
testsuite/tests/safeHaskell/check/pkg01/all.T
testsuite/tests/th/T5358.stderr
testsuite/tests/th/all.T

index 2d9e5d7..7c0b411 100644 (file)
@@ -2,6 +2,9 @@
 def f( opts ):
   opts.only_ways = ['normal']
 
+def normaliseArrayPackage(str):
+    return re.sub('array-[0-9]+(\.[0-9]+)*', 'array-<VERSION>', str)
+
 def normaliseBytestringPackage(str):
     return re.sub('bytestring-[0-9]+(\.[0-9]+)*', 'bytestring-<VERSION>', str)
 
@@ -28,7 +31,8 @@ make_args = 'VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn
 # and can be changed correctly
 test('safePkg01',
      [clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.safePkg01'),
-      normalise_fun(normaliseBytestringPackage)],
+      two_normalisers(normalise_fun(normaliseArrayPackage),
+                      normalise_fun(normaliseBytestringPackage))],
      run_command, 
      ['$MAKE -s --no-print-directory safePkg01 ' + make_args])
 
index 5c9e68c..26c8375 100644 (file)
@@ -1,11 +1,3 @@
-Loading package ghc-prim ... linking ... done.
-Loading package integer-gmp ... linking ... done.
-Loading package base ... linking ... done.
-Loading package array-0.4.0.1 ... linking ... done.
-Loading package deepseq-1.3.0.1 ... linking ... done.
-Loading package containers-0.5.0.0 ... linking ... done.
-Loading package pretty-1.1.1.0 ... linking ... done.
-Loading package template-haskell ... linking ... done.
 
 T5358.hs:7:1:
     Couldn't match expected type `t1 -> t1' with actual type `Int'
index d74bbea..07faaf7 100644 (file)
@@ -196,7 +196,7 @@ test('TH_unresolvedInfix2',
      compile_fail,
      ['-v0'])
 
-test('T5358', normal, compile_fail, [''])
+test('T5358', normal, compile_fail, [' -v0'])
 test('T5379', normal, compile_and_run, [''])
 test('T5404', normal, compile, ['-v0'])
 test('T5410', normal, compile_and_run, ['-v0'])