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


The following commit has been merged in the master branch:
commit f0b1d10d9e9be983e400db7ac816054eac70fff4
Author: John Goerzen <jgoerzen at complete.org>
Date:   Fri Jul 22 00:06:11 2005 +0100

    Updated tests to use new filepath support

diff --git a/testsrc/AnyDBMtest.hs b/testsrc/AnyDBMtest.hs
index bc459a1..1f960b4 100644
--- a/testsrc/AnyDBMtest.hs
+++ b/testsrc/AnyDBMtest.hs
@@ -26,6 +26,7 @@ import MissingH.AnyDBM.StringDBM
 import MissingH.AnyDBM.FiniteMapDBM
 import System.Directory
 import MissingH.IO.HVFS.Utils
+import MissingH.Path.FilePath
 import Data.HashTable
 import Data.List(sort)
 import Control.Exception(finally)
@@ -105,15 +106,12 @@ test_hashtable = generic_test (return ())
 test_finitemap = generic_test (return ())
                   (\_ -> newFiniteMapDBM)
 test_stringdbm = generic_persist_test (return SystemFS)
-                   (\f -> openStringVDBM f "testtmp/StringDBM" ReadWriteMode)
+                   (\f -> openStringVDBM f (joinPaths "testtmp" "StringDBM") ReadWriteMode)
                  ++
                  generic_test (return SystemFS)
-                   (\f -> openStringVDBM f "testtmp/StringDBM" ReadWriteMode)
+                   (\f -> openStringVDBM f (joinPaths "testtmp" "StringDBM") ReadWriteMode)
 
 tests = TestList [TestLabel "HashTable" (TestList test_hashtable),
                   TestLabel "StringDBM" (TestList test_stringdbm),
                   TestLabel "FiniteMap" (TestList test_finitemap)
                  ]
-
-
-
diff --git a/testsrc/GZiptest.hs b/testsrc/GZiptest.hs
index dcb071a..4894f19 100644
--- a/testsrc/GZiptest.hs
+++ b/testsrc/GZiptest.hs
@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 module GZiptest(tests) where
 import Test.HUnit
 import MissingH.FileArchive.GZip
+import MissingH.Path.FilePath
 import MissingH.Compression.Inflate
 import MissingH.IO.Binary
 import System.IO
@@ -26,7 +27,8 @@ import MissingH.Either
 import Data.List
 
 mf fn exp conf = TestLabel fn $ TestCase $
-                     do c <- readBinaryFile ("testsrc/gzfiles/" ++ fn)
+                     do c <- readBinaryFile $
+                          joinPaths "testsrc" $ joinPaths "gzfiles" fn
                         assertEqual "" exp (conf c)
 
 {-

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list