Permalink
Browse files

adding test.

  • Loading branch information...
1 parent 09da8c5 commit 1782864a5ec442b7b07d994bd723ebe4d7c5221b @kazu-yamamoto committed Feb 7, 2012
Showing with 23 additions and 7 deletions.
  1. +8 −0 CmdDB.hs
  2. +2 −2 GenPaths.hs
  3. +1 −0 Types.hs
  4. +12 −5 cab.cabal
View
@@ -188,6 +188,14 @@ commandDB = [
, manual = Just "<source>"
}
, CommandSpec {
+ command = Test
+ , commandNames = ["test"]
+ , document = "run tests"
+ , routing = RouteCabal ["test"]
+ , switches = []
+ , manual = Nothing
+ }
+ , CommandSpec {
command = Help
, commandNames = ["help"]
, document = "Display the help message of the command"
View
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedStrings, DoAndIfThenElse #-}
+{-# LANGUAGE OverloadedStrings #-}
module GenPaths (genPaths) where
@@ -22,7 +22,7 @@ genPaths = do
exist <- doesFileExist file
if exist then
hPutStrLn stderr $ file ++ " already exists"
- else do
+ else do
putStrLn $ "Writing " ++ file ++ "..."
writeFile file $
"module Paths_" ++ nm' ++ " where\n"
View
@@ -77,6 +77,7 @@ data Command = Sync
| Search
| Env
| Add
+ | Test
| Help
deriving (Eq,Show)
View
@@ -16,16 +16,23 @@ Homepage: http://www.mew.org/~kazu/proj/cab/
Category: Distribution
Cabal-Version: >= 1.6
Build-Type: Simple
+
Executable cab
Main-Is: Main.hs
if impl(ghc >= 6.12)
GHC-Options: -Wall -fno-warn-unused-do-bind
else
GHC-Options: -Wall
- Build-Depends: base >= 4.0 && < 5, process, filepath, directory,
- containers, Cabal,
- attoparsec >= 0.10.0.0, attoparsec-enumerator,
- enumerator, bytestring
+ Build-Depends: base >= 4.0 && < 5
+ , Cabal
+ , attoparsec >= 0.10.0.0
+ , attoparsec-enumerator
+ , bytestring
+ , containers
+ , directory
+ , enumerator
+ , filepath
+ , process
if os(windows)
Build-Depends:
else
@@ -43,4 +50,4 @@ Executable cab
Paths_cab
Source-Repository head
Type: git
- Location: git://github.com/kazu-yamamoto/cab.git
+ Location: git clone git://github.com/kazu-yamamoto/cab.git

0 comments on commit 1782864

Please sign in to comment.