[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:54:56 UTC 2010


The following commit has been merged in the master branch:
commit 4135f821bbf550253429df2ac3585f6e0cc56c83
Author: John Goerzen <jgoerzen at complete.org>
Date:   Thu Feb 3 22:40:24 2005 +0100

    Cleaned up temp file handling in AnyDBMTest.hs
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-195)

diff --git a/ChangeLog b/ChangeLog
index 320bd66..84d23f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,24 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2005-02-03 15:40:24 GMT	John Goerzen <jgoerzen at complete.org>	patch-195
+
+    Summary:
+      Cleaned up temp file handling in AnyDBMTest.hs
+    Revision:
+      missingh--head--0.7--patch-195
+
+
+    removed files:
+     testsrc/tmp/.arch-ids/=id
+
+    modified files:
+     ChangeLog Makefile testsrc/AnyDBMtest.hs
+
+    removed directories:
+     testsrc/tmp testsrc/tmp/.arch-ids
+
+
 2005-02-03 14:43:52 GMT	John Goerzen <jgoerzen at complete.org>	patch-194
 
     Summary:
diff --git a/Makefile b/Makefile
index 5debd4b..d351e22 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ clean:
 	-./setup clean
 	-rm -rf html `find . -name "*.o"` `find . -name "*.hi"` \
 		`find . -name "*~"` *.a setup dist testsrc/runtests
-	-rm -rf testsrc/tmp/*
+	-rm -rf testtmp/*
 	-cd doc && $(MAKE) clean
 
 testsrc/runtests: all $(shell find testsrc -name "*.hs")
diff --git a/testsrc/AnyDBMtest.hs b/testsrc/AnyDBMtest.hs
index af23dd6..bb84b89 100644
--- a/testsrc/AnyDBMtest.hs
+++ b/testsrc/AnyDBMtest.hs
@@ -24,6 +24,8 @@ import MissingH.IO.HVFS.InstanceHelpers
 import MissingH.AnyDBM
 import MissingH.AnyDBM.StringDBM
 import MissingH.AnyDBM.FiniteMapDBM
+import System.Directory
+import MissingH.IO.HVFS.Utils
 import Data.HashTable
 import Data.List(sort)
 import Control.Exception(finally)
@@ -48,10 +50,14 @@ weirdl = sort $ [("", "empty"),
                  ("v3,v4", ""),
                  ("k\0ey", "\xFF")]
 
+createdir = TestCase $ createDirectory "testtmp"
+removedir = TestCase $ recursiveRemove SystemFS "testtmp"
+
 generic_test initfunc openfunc =
     let f = mf initfunc openfunc in
         [
-         f "empty" $ \h -> do [] @>=? keysA h
+         createdir
+        ,f "empty" $ \h -> do [] @>=? keysA h
                               [] @>=? valuesA h
                               [] @>=? toListA h
                               Nothing @>=? lookupA h "foo"
@@ -72,12 +78,14 @@ generic_test initfunc openfunc =
         ,f "weirdchars" $ \h -> do insertListA h weirdl
                                    weirdl @>=? (toListA h >>= return . sort)
                                    deleteall h
+        ,removedir
         ]
 
 generic_persist_test initfunc openfunc =
     let f = mf initfunc openfunc in
         [
-         f "empty" deleteall 
+         createdir
+        ,f "empty" deleteall 
         ,f "weirdpop" $ \h -> insertListA h weirdl
         ,f "weirdcheck" $ \h -> do weirdl @>=? (toListA h >>= return . sort)
                                    deleteall h
@@ -87,7 +95,8 @@ generic_persist_test initfunc openfunc =
                               insertA h "z" "y"
         ,f "step4" $ \h -> do [("key", "v2"), ("z", "y")] @>=?
                                  (toListA h >>= return . sort)
-        ,f "cleanup" deleteall
+        ,f "cleanupdb" deleteall
+        ,removedir
         ]
 
 test_hashtable = generic_test (return ())
@@ -96,10 +105,10 @@ test_hashtable = generic_test (return ())
 test_finitemap = generic_test (return ())
                   (\_ -> newFiniteMapDBM)
 test_stringdbm = generic_persist_test (return SystemFS)
-                   (\f -> openStringVDBM f "testsrc/tmp/StringDBM" ReadWriteMode)
+                   (\f -> openStringVDBM f "testtmp/StringDBM" ReadWriteMode)
                  ++
                  generic_test (return SystemFS)
-                   (\f -> openStringVDBM f "testsrc/tmp/StringDBM" ReadWriteMode)
+                   (\f -> openStringVDBM f "testtmp/StringDBM" ReadWriteMode)
 
 tests = TestList [TestLabel "HashTable" (TestList test_hashtable),
                   TestLabel "StringDBM" (TestList test_stringdbm),

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list