From 38a46db836d50bef55ce368a98fd73333a498690 Mon Sep 17 00:00:00 2001
From: Kristen Kozak <grayjay@wordroute.com>
Date: Fri, 19 Jun 2015 18:06:22 -0700
Subject: [PATCH] Allow cabal freeze tests to run on Windows

The tests now read cabal.config strictly so that the file is closed by the time
it is deleted for the next test.
---
 cabal-install/tests/PackageTests/Freeze/Check.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cabal-install/tests/PackageTests/Freeze/Check.hs b/cabal-install/tests/PackageTests/Freeze/Check.hs
index 00c87f3619..0353081c7f 100644
--- a/cabal-install/tests/PackageTests/Freeze/Check.hs
+++ b/cabal-install/tests/PackageTests/Freeze/Check.hs
@@ -110,4 +110,7 @@ removeCabalConfig = do
 
 readCabalConfig :: IO String
 readCabalConfig = do
-    readFile $ dir </> "cabal.config"
+    config <- readFile $ dir </> "cabal.config"
+    -- Ensure that the file is closed so that it can be
+    -- deleted by the next test on Windows.
+    length config `seq` return config
-- 
GitLab