[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:50 UTC 2010


The following commit has been merged in the master branch:
commit 94168cd6313791f4fb78e30edd970172d362c1f1
Author: John Goerzen <jgoerzen at complete.org>
Date:   Thu Feb 3 00:05:24 2005 +0100

    checkpointing
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-190)

diff --git a/ChangeLog b/ChangeLog
index b6d5b4e..c31c466 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,25 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2005-02-02 17:05:24 GMT	John Goerzen <jgoerzen at complete.org>	patch-190
+
+    Summary:
+      checkpointing
+    Revision:
+      missingh--head--0.7--patch-190
+
+
+    new files:
+     testsrc/tmp/.arch-ids/=id
+
+    modified files:
+     ChangeLog Makefile libsrc/MissingH/AnyDBM/StringDBM.hs
+     testsrc/AnyDBMtest.hs
+
+    new directories:
+     testsrc/tmp testsrc/tmp/.arch-ids
+
+
 2005-02-02 16:47:12 GMT	John Goerzen <jgoerzen at complete.org>	patch-189
 
     Summary:
diff --git a/Makefile b/Makefile
index ccc58b7..5debd4b 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +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/*
 	-cd doc && $(MAKE) clean
 
 testsrc/runtests: all $(shell find testsrc -name "*.hs")
diff --git a/libsrc/MissingH/AnyDBM/StringDBM.hs b/libsrc/MissingH/AnyDBM/StringDBM.hs
index fe26ffb..9281b31 100644
--- a/libsrc/MissingH/AnyDBM/StringDBM.hs
+++ b/libsrc/MissingH/AnyDBM/StringDBM.hs
@@ -36,6 +36,7 @@ The data is written out during a call to 'flush' or 'close'.
 
 module MissingH.AnyDBM.StringDBM (StringDBM,
                                   openStringDBM,
+                                  openStringVDBM,
                                   SystemFS(..),
                                   IOMode(..)
                                  )
@@ -49,29 +50,30 @@ import Data.HashTable
 {- | The type of the StringDBM instances. -}
 data StringDBM = forall a. HVFSOpenable a => StringDBM (HashTable String String) IOMode a FilePath
 
-{-
 {- | Opens a 'StringDBM' file.  Please note: only ReadMode, WriteMode,
 and ReadWriteMode are supported for the IOMode.  AppendMode is not supported. 
+
+>openStringDBM = openStringVDBM SystemFS
 -}
 openStringDBM :: FilePath -> IOMode -> IO StringDBM
-openStringDBM = openStringHVDBM SystemFS
--}
+openStringDBM = openStringVDBM SystemFS
+
 {- | Opens a 'StringDBM' file.  Please note: only ReadMode, WriteMode,
 and ReadWriteMode are supported for the IOMode.  AppendMode is not supported.
 
 To work on your system's normal (real) filesystem, just specify
 'SystemFS' for the first argument.
 -}
-openStringDBM :: HVFSOpenable a => a -> FilePath -> IOMode -> IO StringDBM
-openStringDBM _ _ AppendMode = fail "openStringDBM: AppendMode is not supported"
-openStringDBM h fp ReadMode =
+openStringVDBM :: HVFSOpenable a => a -> FilePath -> IOMode -> IO StringDBM
+openStringVDBM _ _ AppendMode = fail "openStringDBM: AppendMode is not supported"
+openStringVDBM h fp ReadMode =
     do ht <- new (==) hashString
        vReadFile h fp >>= strToA ht
        return $ StringDBM ht ReadMode h fp
-openStringDBM h fp WriteMode =
+openStringVDBM h fp WriteMode =
     do ht <- new (==) hashString
        return $ StringDBM ht WriteMode h fp
-openStringDBM h fp ReadWriteMode =
+openStringVDBM h fp ReadWriteMode =
     -- Nothing different to start with.  Later, we emulate WriteMode.
     -- Nothing is ever read after the object is created.
     do ht <- new (==) hashString
diff --git a/testsrc/AnyDBMtest.hs b/testsrc/AnyDBMtest.hs
index 6ea6beb..6055f72 100644
--- a/testsrc/AnyDBMtest.hs
+++ b/testsrc/AnyDBMtest.hs
@@ -75,8 +75,8 @@ generic_test initfunc openfunc =
 
 test_hashtable = generic_test (return ())
                   (\_ -> ((new (==) hashString)::IO (HashTable String String)))
-test_stringdbm = generic_test (newMemoryVFS [])
-                   (\f -> openStringDBM f "/foo" ReadWriteMode)
+test_stringdbm = generic_test (return SystemFS)
+                   (\f -> openStringVDBM f "testsrc/tmp/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