From f48bdb46e4388d2b84d1d9a9d943506ef23221e8 Mon Sep 17 00:00:00 2001
From: quasicomputational <quasicomputational@gmail.com>
Date: Fri, 22 Jun 2018 12:42:13 +0100
Subject: [PATCH] Update tests to accomodate output changes in GHC HEAD.

---
 .../PackageTests/Backpack/Includes1/setup.test.hs            | 2 +-
 .../PackageTests/Backpack/Includes5/setup.test.hs            | 5 ++++-
 .../PackageTests/BuildDeps/TargetSpecificDeps1/setup.test.hs | 2 +-
 .../PackageTests/BuildDeps/TargetSpecificDeps3/setup.test.hs | 2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/cabal-testsuite/PackageTests/Backpack/Includes1/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes1/setup.test.hs
index 882ad5f294..821397afd6 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes1/setup.test.hs
+++ b/cabal-testsuite/PackageTests/Backpack/Includes1/setup.test.hs
@@ -5,4 +5,4 @@ main = setupAndCabalTest $ do
     r <- fails $ setup' "build" []
     assertRegex "error should be in B.hs" "^B.hs:" r
     assertRegex "error should be \"Could not find module Data.Set\""
-                "(Could not find module|Failed to load interface).*Data.Set" r
+                "(Could not (load|find) module|Failed to load interface).*Data.Set" r
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs
index adda8fb9f5..ca49edf3fe 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs
+++ b/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs
@@ -4,5 +4,8 @@ main = setupAndCabalTest $ do
     setup "configure" []
     r <- fails $ setup' "build" []
     assertOutputContains "Foobar" r
-    assertOutputContains "Could not find" r
+    assertRegex
+      "error should be about not being able to find a module"
+      "Could not (find|load) module"
+      r
     return ()
diff --git a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.test.hs
index 16081d95b0..790afd6aa2 100644
--- a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.test.hs
+++ b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.test.hs
@@ -8,4 +8,4 @@ main = setupAndCabalTest $ do
     assertRegex "error should be in MyLibrary.hs" "^MyLibrary.hs:" r
     assertRegex
       "error should be \"Could not find module `Text\\.PrettyPrint\""
-      "(Could not find module|Failed to load interface for).*Text\\.PrettyPrint" r
+      "(Could not (load|find) module|Failed to load interface for).*Text\\.PrettyPrint" r
diff --git a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.test.hs
index 9783b3ea71..7132bb9c9e 100644
--- a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.test.hs
+++ b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.test.hs
@@ -8,4 +8,4 @@ main = setupAndCabalTest $ do
     assertRegex "error should be in lemon.hs" "^lemon.hs:" r
     assertRegex
       "error should be \"Could not find module `Text\\.PrettyPrint\""
-      "(Could not find module|Failed to load interface for).*Text\\.PrettyPrint" r
+      "(Could not (load|find) module|Failed to load interface for).*Text\\.PrettyPrint" r
-- 
GitLab