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


The following commit has been merged in the master branch:
commit c0f7aa381845a408597a27706e414f9c70441135
Author: John Goerzen <jgoerzen at complete.org>
Date:   Sat Apr 16 10:33:47 2005 +0100

    Backed out Cmd changes
    
    Hugs doesn't have enough smarts to support pOpen3, it appears, so backing
    out the earlier attempts to get it working with hugs and test it there.

diff --git a/MissingH/Cmd.hs b/MissingH/Cmd.hs
index f472756..5d076ec 100644
--- a/MissingH/Cmd.hs
+++ b/MissingH/Cmd.hs
@@ -1,5 +1,6 @@
-{- arch-tag: Command utilities main file
-Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+-- arch-tag: Command utilities main file
+{-
+Copyright (C) 2004-2005 John Goerzen <jgoerzen at complete.org>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -38,6 +39,10 @@ where
 
 -- FIXME - largely obsoleted by 6.4 - convert to wrappers.
 
+#ifdef __HUGS__
+ERROR -- This module is not compatible with Hugs.
+#endif
+
 import System.Exit
 import System.Cmd
 import MissingH.Logging.Logger
@@ -45,6 +50,7 @@ import System.Posix.IO
 import System.Posix.Process
 import System.Posix.Types
 import System.IO
+
 import qualified System.Posix.Signals
 
 data PipeMode = ReadFromPipe | WriteToPipe
@@ -130,7 +136,7 @@ pOpen3 :: Maybe Fd                      -- ^ Send stdin to this fd
        -> FilePath                      -- ^ Command to run
        -> [String]                      -- ^ Command args
        -> (ProcessID -> IO a)           -- ^ Action to run in parent
-       -> IO ()                         -- ^ Action to run in child before execing (if you don't need something, set this to @return ()@)
+       -> IO ()                         -- ^ Action to run in child before execing (if you don't need something, set this to @return ()@) -- IGNORED IN HUGS
        -> IO a
 pOpen3 pin pout perr fp args func childfunc = 
     let mayberedir Nothing _ = return ()
diff --git a/testsrc/Cmdtest.hs b/testsrc/Cmdtest.hs
deleted file mode 100644
index d095931..0000000
--- a/testsrc/Cmdtest.hs
+++ /dev/null
@@ -1,36 +0,0 @@
-{- 
-Copyright (C) 2005 John Goerzen <jgoerzen at complete.org>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--}
-
-module Cmdtest(tests) where
-import HUnit
-import MissingH.Cmd
-import System.IO
-
-test_pOpen_Read = 
-    let f cmd args result = TestLabel (cmd ++ " " ++ show args) $ TestCase $
-                            do x <- pOpen ReadFromPipe cmd args rf
-                               result @=? x
-        rf h = do c <- hGetContents h
-                  seq c (return c)
-        in [
-            f "echo" ["Hello."] "Hello\n"
-           ]
-
-tests = TestList [TestLabel "read" (TestList test_pOpen_Read)]
-
-
diff --git a/testsrc/Tests.hs b/testsrc/Tests.hs
index 5237f9a..2b96aea 100644
--- a/testsrc/Tests.hs
+++ b/testsrc/Tests.hs
@@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 module Tests(tests) where
 import HUnit
-import qualified Cmdtest
 import qualified MIMETypestest
 import qualified Listtest
 import qualified FiniteMaptest

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list