[prev in list] [next in list] [prev in thread] [next in thread] 

List:       darcs-devel
Subject:    [darcs-devel] [patch1107] add command-line options to control glob... (and 6 more)
From:       Ganesh Sittampalam <bugs () darcs ! net>
Date:       2013-11-26 7:42:42
Message-ID: E1VlCqT-0006Jh-Qi () urchin ! earth ! li
[Download RAW message or body]

New submission from Ganesh Sittampalam <ganesh@earth.li>:

Cut down the test suiet and make the configurations more controllable
as described at
http://lists.osuosl.org/pipermail/darcs-devel/2013-November/015349.html

7 patches for repository darcs-unstable@darcs.net:screened:

Thu Nov 14 06:24:18 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * add command-line options to control global test options
  Default to just running for darcs-2 and patience diff

Thu Nov 14 06:38:38 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * remove explicit choice of Myers diff from test
  it passes fine with patience diff

Fri Nov 15 00:04:11 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * add pragmas to shell tests to allow for the test to specify configurati=
ons

Fri Nov 15 06:39:10 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * add a TODO comment

Tue Nov 26 06:22:27 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * fix warnings

Tue Nov 26 07:08:04 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * need to use ByteString to read tests on unix
  Files may not be valid UTF-8

Tue Nov 26 07:08:20 GMT 2013  Ganesh Sittampalam <ganesh@earth.li>
  * improve help text

----------
files: add-command_line-options-to-control-global-test-options.dpatch, patc=
h-preview.txt, unnamed
messages: 17091
nosy: ganesh
status: needs-screening
title: add command-line options to control glob... (and 6 more)

__________________________________
Darcs bug tracker <bugs@darcs.net>
<http://bugs.darcs.net/patch1107>
__________________________________
["patch-preview.txt" (text/x-darcs-patch)]


[add command-line options to control global test options
Ganesh Sittampalam <ganesh@earth.li>**20131114062418
 Ignore-this: fe686da9d5bb1d8138148f0ca3572233
 Default to just running for darcs-2 and patience diff
] hunk ./darcs.cabal 636
                      parsec       >= 2.0 && < 3.2,
                      regex-compat >= 0.95.1,
                      shellish     >= 0.1.3 && < 0.2,
+                     split        >= 0.1.4.1 && < 0.3,
                      text         >= 0.11.0.6 && < 0.12.0.0,
                      directory  >= 1.0.0.0 && < 1.3.0.0,
                      FindBin      >= 0.0 && < 0.1,
hunk ./harness/test.hs 1
-{-# LANGUAGE CPP, MultiParamTypeClasses, DeriveDataTypeable #-}
+{-# LANGUAGE CPP, MultiParamTypeClasses, DeriveDataTypeable, ViewPatterns #-}
 module Main ( main ) where
 
 #ifdef DISABLE_TESTING
hunk ./harness/test.hs 15
 import qualified Darcs.Test.Email
 
 import Control.Monad ( when, unless, filterM )
+import Data.Char ( toLower )
 import Data.List ( isPrefixOf, isSuffixOf, sort )
hunk ./harness/test.hs 17
+import Data.List.Split ( splitOn )
 import qualified Data.ByteString.Char8 as B
 import GHC.IO.Encoding ( textEncodingName )
 import System.Console.CmdLib
hunk ./harness/test.hs 44
 -- shell tests
 -- ----------------------------------------------------------------------
 
-data Format = Darcs1 | Darcs2 deriving Show
-data DiffAlgorithm = MyersDiff | PatienceDiff deriving Show
+data Format = Darcs1 | Darcs2 deriving (Show, Eq, Typeable, Data)
+data DiffAlgorithm = MyersDiff | PatienceDiff deriving (Show, Eq, Typeable, Data)
 data Running = Running deriving Show
 data Result = Success | Skipped | Failed String
 
hunk ./harness/test.hs 132
 shellTest :: FilePath -> Format -> Maybe FilePath -> String -> DiffAlgorithm -> Test
 shellTest dp fmt tdir file da = Test (file ++ " (" ++ show fmt ++ ")" ++ " (" ++ \
show da ++ ")") $ ShellTest fmt file tdir dp da  
-findShell :: FilePath -> Maybe FilePath -> Bool -> ShIO [Test]
-findShell dp tdir isFailing =
+findShell :: FilePath -> Maybe FilePath -> Bool -> [DiffAlgorithm] -> [Format] -> \
ShIO [Test] +findShell dp tdir isFailing diffAlgorithms repoFormats =
   do files <- sort <$> grep relevant <$> grep (".sh" `isSuffixOf`) <$> ls "tests"
      return [ shellTest dp fmt tdir file da
hunk ./harness/test.hs 136
-            | fmt <- [ Darcs2, Darcs1 ]
+            | fmt <- repoFormats
             , file <- files
hunk ./harness/test.hs 138
-            , da <- [ MyersDiff, PatienceDiff ] ]
+            , da <- diffAlgorithms ]
   where relevant = (if isFailing then id else not) . ("failing-" `isPrefixOf`)
 
hunk ./harness/test.hs 141
-findNetwork :: FilePath -> Maybe FilePath -> ShIO [Test]
-findNetwork dp tdir =
+findNetwork :: FilePath -> Maybe FilePath -> [DiffAlgorithm] -> [Format] -> ShIO \
[Test] +findNetwork dp tdir diffAlgorithms repoFormats =
   do files <- sort <$> grep (".sh" `isSuffixOf`) <$> ls "tests/network"
hunk ./harness/test.hs 144
-     return [ shellTest dp Darcs2 tdir ("network" </> file) da | file <- files , da \
<- [ MyersDiff, PatienceDiff ] ] +     return [ shellTest dp fmt tdir ("network" </> \
file) da | file <- files , fmt <- repoFormats, da <- diffAlgorithms ]  
 -- ----------------------------------------------------------------------
 -- harness
hunk ./harness/test.hs 154
                      , shell :: Bool
                      , network :: Bool
                      , unit :: Bool
+                     , diffAlgorithm :: [DiffAlgorithm]
+                     , repoFormat :: [Format]
                      , darcs :: String
                      , tests :: [String]
                      , testDir :: Maybe FilePath
hunk ./harness/test.hs 170
     , shell %> Help "Run the passing, non-network shell tests." %+ Default True
     , network %> Help "Run the network shell tests."
     , unit %> Help "Run the unit tests." %+ Default True
+    , diffAlgorithm %> Help "Diff algorithm(s) to test." %+ Default [PatienceDiff]
+    , repoFormat %> Help "Repo formats to test." %+ Default [Darcs2]
     , tests %> Help "Pattern to limit the tests to run." %+ short 't'
     , testDir %> Help "Directory to run tests in" %+ Default (Nothing :: Maybe \
FilePath)  , plain %> Help "Use plain-text output."
hunk ./harness/test.hs 178
     , hideSuccesses %> Help "Hide successes."
     , threads %> Default (1 :: Int) %+ short 'j' ]
 
+  readFlag _ = readCommon <+< list readDiffAlgorithm <+< list readRepoFormat
+    where
+      readDiffAlgorithm (map toLower -> "myers") = MyersDiff
+      readDiffAlgorithm (map toLower -> "patience") = PatienceDiff
+      readDiffAlgorithm _ = error "Valid diff algorithms: myers, patience"
+      readRepoFormat (map toLower -> "darcs-1") = Darcs1
+      readRepoFormat (map toLower -> "darcs-2") = Darcs2
+      readRepoFormat _ = error "Valid repo formats: darcs-1, darcs-2"
+      list w str = map w (splitOn "," str)
+
 data DarcsTest = DarcsTest deriving Typeable
 instance Command DarcsTest (Record Config) where
   run _ conf _ = do
hunk ./harness/test.hs 228
 
     putStrLn $ "Locale encoding is " ++ textEncodingName localeEncoding
 
-    ftests <- shellish $ if failing conf then findShell darcsBin (testDir conf) True \
                else return []
-    stests <- shellish $ if shell conf then findShell darcsBin (testDir conf) False \
else return [] +    ftests <- shellish $ if failing conf then findShell darcsBin \
(testDir conf) True (diffAlgorithm conf) (repoFormat conf) else return [] +    stests \
<- shellish $ if shell conf then findShell darcsBin (testDir conf) False \
(diffAlgorithm conf) (repoFormat conf) else return []  utests <- if unit conf then \
doUnit else return [] hunk ./harness/test.hs 231
-    ntests <- shellish $ if network conf then findNetwork darcsBin (testDir conf) \
else return [] +    ntests <- shellish $ if network conf then findNetwork darcsBin \
(testDir conf) (diffAlgorithm conf) (repoFormat conf) else return []  \
defaultMainWithArgs (ftests ++ stests ++ utests ++ ntests) args  where
           exeSuffix :: String
[remove explicit choice of Myers diff from test
Ganesh Sittampalam <ganesh@earth.li>**20131114063838
 Ignore-this: a3ea3033ba13c049f6ac9baf90405e72
 it passes fine with patience diff
] hunk ./tests/issue121.sh 33
 cd R
 touch a
 darcs add a
-darcs rec --myers --ignore-times -am 'add a'
+darcs rec --ignore-times -am 'add a'
 (echo '1' ; echo '1' ; echo '1') > a
hunk ./tests/issue121.sh 35
-darcs rec --myers --ignore-times -am 'patch X'
+darcs rec --ignore-times -am 'patch X'
 (echo '2' ; echo '1' ; echo '1') > a
hunk ./tests/issue121.sh 37
-darcs rec --myers --ignore-times -am 'patch Y'
+darcs rec --ignore-times -am 'patch Y'
 (echo '2' ; echo '1' ; echo '2') > a
hunk ./tests/issue121.sh 39
-darcs rec --myers --ignore-times -am 'patch Z'
+darcs rec --ignore-times -am 'patch Z'
 
 darcs obliterate --dry-run --patch 'patch Y' | not grep 'patch Z'
 
hunk ./tests/issue121.sh 43
-echo 'yYyY' | tr '[A-Z]' '[a-z]' | darcs amend-rec --myers --ask-deps
+echo 'yYyY' | tr '[A-Z]' '[a-z]' | darcs amend-rec --ask-deps
 
 darcs obliterate --dry-run --patch 'patch Y' | grep 'patch Z'
[add pragmas to shell tests to allow for the test to specify configurations
Ganesh Sittampalam <ganesh@earth.li>**20131115000411
 Ignore-this: 68ec1ad0e28ce1275d9450ceb64fc6f8
] hunk ./harness/test.hs 15
 import qualified Darcs.Test.Email
 
 import Control.Monad ( when, unless, filterM )
+import qualified Control.Monad.Trans
 import Data.Char ( toLower )
 import Data.List ( isPrefixOf, isSuffixOf, sort )
 import Data.List.Split ( splitOn )
hunk ./harness/test.hs 20
 import qualified Data.ByteString.Char8 as B
+import Data.Maybe ( fromMaybe )
 import GHC.IO.Encoding ( textEncodingName )
 import System.Console.CmdLib
 import System.Directory ( doesFileExist )
hunk ./harness/test.hs 110
         pathVarSeparator = ":"
 #endif
 
+readOptionList :: (String -> a) -> (String -> [a])
+readOptionList readElem str = map readElem (splitOn "," str)
+
+readDiffAlgorithm :: String -> DiffAlgorithm
+readDiffAlgorithm (map toLower -> "myers") = MyersDiff
+readDiffAlgorithm (map toLower -> "patience") = PatienceDiff
+readDiffAlgorithm _ = error "Valid diff algorithms: myers, patience"
+
+readRepoFormat :: String -> Format
+readRepoFormat (map toLower -> "darcs-1") = Darcs1
+readRepoFormat (map toLower -> "darcs-2") = Darcs2
+readRepoFormat _ = error "Valid repo formats: darcs-1, darcs-2"
+
 runtest :: ShellTest -> ShIO Result
 runtest t =
  withTmp $ \dir -> do
hunk ./harness/test.hs 147
 shellTest :: FilePath -> Format -> Maybe FilePath -> String -> DiffAlgorithm -> Test
 shellTest dp fmt tdir file da = Test (file ++ " (" ++ show fmt ++ ")" ++ " (" ++ \
show da ++ ")") $ ShellTest fmt file tdir dp da  
+hasPrefix :: String -> String -> Maybe String
+hasPrefix prefix =
+    let len = length prefix in
+    \str -> if take len str == prefix then Just (drop len str) else Nothing
+
+-- use of a pragma in a test script overrides the user's selection for that \
particular test, +-- based on the assumption that the test author knows best
+parsePragmas :: FilePath -> FilePath -> IO (FilePath, (Maybe [DiffAlgorithm], Maybe \
[Format])) +parsePragmas path file = do
+  contents <- lines <$> readFile (path </> file)
+  let parseLine
+          (diffAlgorithms, repoFormats)
+          (hasPrefix "#pragma diff-algorithm " -> Just (readOptionList \
readDiffAlgorithm -> newDiffAlgorithms)) +         = (Just newDiffAlgorithms, \
repoFormats) +      parseLine
+          (diffAlgorithms, repoFormats)
+          (hasPrefix "#pragma repo-format " -> Just (readOptionList readRepoFormat \
-> newRepoFormats)) +         = (diffAlgorithms, Just newRepoFormats)
+      parseLine _ (hasPrefix "#pragma " -> Just pragma) = error $ "Unknown pragma " \
++ pragma ++ " in " ++ (path </> file) +      parseLine x _ = x
+      pragmas = foldl parseLine (Nothing, Nothing) contents
+  return (file, pragmas)
+
 findShell :: FilePath -> Maybe FilePath -> Bool -> [DiffAlgorithm] -> [Format] -> \
ShIO [Test] hunk ./harness/test.hs 171
-findShell dp tdir isFailing diffAlgorithms repoFormats =
+findShell dp tdir isFailing diffAlgorithmsDefault repoFormatsDefault =
   do files <- sort <$> grep relevant <$> grep (".sh" `isSuffixOf`) <$> ls "tests"
hunk ./harness/test.hs 173
+     annotatedFiles <- Control.Monad.Trans.liftIO $ mapM (parsePragmas "tests") \
files  return [ shellTest dp fmt tdir file da
hunk ./harness/test.hs 175
-            | fmt <- repoFormats
-            , file <- files
-            , da <- diffAlgorithms ]
+            | (file, (diffAlgorithmsPragma, repoFormatsPragma)) <- annotatedFiles
+            , fmt <- fromMaybe repoFormatsDefault repoFormatsPragma
+            , da <- fromMaybe diffAlgorithmsDefault diffAlgorithmsPragma ]
   where relevant = (if isFailing then id else not) . ("failing-" `isPrefixOf`)
 
 findNetwork :: FilePath -> Maybe FilePath -> [DiffAlgorithm] -> [Format] -> ShIO \
[Test] hunk ./harness/test.hs 181
-findNetwork dp tdir diffAlgorithms repoFormats =
+findNetwork dp tdir diffAlgorithmsDefault repoFormatsDefault =
   do files <- sort <$> grep (".sh" `isSuffixOf`) <$> ls "tests/network"
hunk ./harness/test.hs 183
-     return [ shellTest dp fmt tdir ("network" </> file) da | file <- files , fmt <- \
repoFormats, da <- diffAlgorithms ] +     annotatedFiles <- \
Control.Monad.Trans.liftIO $ mapM (parsePragmas "tests/network") files +     return [ \
shellTest dp fmt tdir ("network" </> file) da  +            | (file, \
(diffAlgorithmsPragma, repoFormatsPragma)) <- annotatedFiles +            , fmt <- \
fromMaybe repoFormatsDefault repoFormatsPragma +            , da <- fromMaybe \
diffAlgorithmsDefault diffAlgorithmsPragma ]  
 -- ----------------------------------------------------------------------
 -- harness
hunk ./harness/test.hs 221
     , hideSuccesses %> Help "Hide successes."
     , threads %> Default (1 :: Int) %+ short 'j' ]
 
-  readFlag _ = readCommon <+< list readDiffAlgorithm <+< list readRepoFormat
-    where
-      readDiffAlgorithm (map toLower -> "myers") = MyersDiff
-      readDiffAlgorithm (map toLower -> "patience") = PatienceDiff
-      readDiffAlgorithm _ = error "Valid diff algorithms: myers, patience"
-      readRepoFormat (map toLower -> "darcs-1") = Darcs1
-      readRepoFormat (map toLower -> "darcs-2") = Darcs2
-      readRepoFormat _ = error "Valid repo formats: darcs-1, darcs-2"
-      list w str = map w (splitOn "," str)
+  readFlag _ = readCommon <+< readOptionList readDiffAlgorithm <+< readOptionList \
readRepoFormat  
 data DarcsTest = DarcsTest deriving Typeable
 instance Command DarcsTest (Record Config) where
hunk ./tests/changes-duplicate.sh 27
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-2
+
 . lib
 grep darcs-2 $HOME/.darcs/defaults || exit 200
 
hunk ./tests/conflict-doppleganger.sh 3
 #!/usr/bin/env bash
 
+#pragma repo-format darcs-1,darcs-2
+
 . lib
 
 # Tests for the doppleganger conflict bug.
hunk ./tests/convert.sh 29
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-1
+
 . lib
 
 grep darcs-1 $HOME/.darcs/defaults || exit 200
hunk ./tests/failing-issue1401_bug_in_get_extra.sh 28
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-2
+
 . lib
 
 ## This bug only affects darcs-2 repositories.
hunk ./tests/failing-issue1610_get_extra.sh 28
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-1
+
 . lib                  # Load some portability helpers.
 
 # this test is not relevant for darcs 2 repositories
hunk ./tests/get-http-packed-detect.sh 7
 # Tets that darcs get --verbose reports getting a pack when there is one,
 # and does not report when there is none or when --no-packs is passed.
 
+#pragma repo-format darcs-1,darcs-2
+
 . lib
 
 rm -rf S
hunk ./tests/get-http-packed.sh 4
 #!/usr/bin/env bash
 # Written in 2010 by Petr Rockai, placed in public domain
 
+#pragma repo-format darcs-1,darcs-2
+
 . lib
 
 rm -rf S
hunk ./tests/issue1978.sh 3
 #!/usr/bin/env bash
 
+#pragma repo-format darcs-2
+
 . lib
 
 mkdir future
hunk ./tests/issue436.sh 2
 #!/usr/bin/env bash
+
+#pragma repo-format darcs-2
+
 . ./lib
 
 rm -rf temp1 temp2
hunk ./tests/pull_many_files.sh 4
 #!/usr/bin/env bash
 . lib
 
+#pragma repo-format darcs-1,darcs-2
+
 rm -rf temp1 temp2
 
 if grep darcs-1 .darcs/defaults; then
hunk ./tests/repoformat.sh 3
 #!/usr/bin/env bash
 
+#pragma repo-format darcs-1,darcs-2
+
 . lib
 
 rm -rf garbage future
hunk ./tests/send-output-v1.sh 27
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-1
+
 . lib                  # Load some portability helpers.
 
 grep darcs-1 $HOME/.darcs/defaults || exit 200
hunk ./tests/send-output-v2.sh 27
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-2
+
 . lib                  # Load some portability helpers.
 
 grep darcs-2 $HOME/.darcs/defaults || exit 200
hunk ./tests/split-patches.sh 27
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-1,darcs-2
+
 . lib                  # Load some portability helpers.
 
 if grep darcs-2 .darcs/defaults; then
hunk ./tests/v1-braced.sh 27
 ## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 ## SOFTWARE.
 
+#pragma repo-format darcs-1
+
 . lib                  # Load some portability helpers.
 
 grep darcs-1 $HOME/.darcs/defaults || exit 200
[add a TODO comment
Ganesh Sittampalam <ganesh@earth.li>**20131115063910
 Ignore-this: 77eb074fb7afb37e88e3fa4cd0c5e49c
] hunk ./harness/test.hs 110
         pathVarSeparator = ":"
 #endif
 
+-- TODO: add a 'all' option (implement using an Enum instance)?
 readOptionList :: (String -> a) -> (String -> [a])
 readOptionList readElem str = map readElem (splitOn "," str)
 
[fix warnings
Ganesh Sittampalam <ganesh@earth.li>**20131126062227
 Ignore-this: 97fb8bc885b35eb4231e952ee23c2ca1
] hunk ./harness/test.hs 159
 parsePragmas path file = do
   contents <- lines <$> readFile (path </> file)
   let parseLine
-          (diffAlgorithms, repoFormats)
+          (_diffAlgorithms, repoFormats)
           (hasPrefix "#pragma diff-algorithm " -> Just (readOptionList \
readDiffAlgorithm -> newDiffAlgorithms))  = (Just newDiffAlgorithms, repoFormats)
       parseLine
hunk ./harness/test.hs 163
-          (diffAlgorithms, repoFormats)
+          (diffAlgorithms, _repoFormats)
           (hasPrefix "#pragma repo-format " -> Just (readOptionList readRepoFormat \
-> newRepoFormats))  = (diffAlgorithms, Just newRepoFormats)
       parseLine _ (hasPrefix "#pragma " -> Just pragma) = error $ "Unknown pragma " \
++ pragma ++ " in " ++ (path </> file) [need to use ByteString to read tests on unix
Ganesh Sittampalam <ganesh@earth.li>**20131126070804
 Ignore-this: 3ec9b4fb831023def0062c62f95c23d0
 Files may not be valid UTF-8
] hunk ./harness/test.hs 148
 shellTest :: FilePath -> Format -> Maybe FilePath -> String -> DiffAlgorithm -> Test
 shellTest dp fmt tdir file da = Test (file ++ " (" ++ show fmt ++ ")" ++ " (" ++ \
show da ++ ")") $ ShellTest fmt file tdir dp da  
-hasPrefix :: String -> String -> Maybe String
+hasPrefix :: B.ByteString -> B.ByteString -> Maybe B.ByteString
 hasPrefix prefix =
hunk ./harness/test.hs 150
-    let len = length prefix in
-    \str -> if take len str == prefix then Just (drop len str) else Nothing
+    let len = B.length prefix in
+    \str -> if B.take len str == prefix then Just (B.drop len str) else Nothing
 
 -- use of a pragma in a test script overrides the user's selection for that \
                particular test,
 -- based on the assumption that the test author knows best
hunk ./harness/test.hs 157
 parsePragmas :: FilePath -> FilePath -> IO (FilePath, (Maybe [DiffAlgorithm], Maybe \
[Format]))  parsePragmas path file = do
-  contents <- lines <$> readFile (path </> file)
+  contents <- B.lines <$> B.readFile (path </> file)
   let parseLine
           (_diffAlgorithms, repoFormats)
hunk ./harness/test.hs 160
-          (hasPrefix "#pragma diff-algorithm " -> Just (readOptionList \
readDiffAlgorithm -> newDiffAlgorithms)) +          (hasPrefix (B.pack "#pragma \
diff-algorithm ") -> Just (readOptionList readDiffAlgorithm . B.unpack -> \
newDiffAlgorithms))  = (Just newDiffAlgorithms, repoFormats)
       parseLine
           (diffAlgorithms, _repoFormats)
hunk ./harness/test.hs 164
-          (hasPrefix "#pragma repo-format " -> Just (readOptionList readRepoFormat \
-> newRepoFormats)) +          (hasPrefix (B.pack "#pragma repo-format ") -> Just \
(readOptionList readRepoFormat . B.unpack -> newRepoFormats))  = (diffAlgorithms, \
Just newRepoFormats) hunk ./harness/test.hs 166
-      parseLine _ (hasPrefix "#pragma " -> Just pragma) = error $ "Unknown pragma " \
++ pragma ++ " in " ++ (path </> file) +      parseLine _ (hasPrefix (B.pack "#pragma \
") -> Just pragma) = error $ "Unknown pragma " ++ B.unpack pragma ++ " in " ++ (path \
</> file)  parseLine x _ = x
       pragmas = foldl parseLine (Nothing, Nothing) contents
   return (file, pragmas)
[improve help text
Ganesh Sittampalam <ganesh@earth.li>**20131126070820
 Ignore-this: 25186788203ef343aeb3dba860568ce6
] hunk ./harness/test.hs 214
     , shell %> Help "Run the passing, non-network shell tests." %+ Default True
     , network %> Help "Run the network shell tests."
     , unit %> Help "Run the unit tests." %+ Default True
-    , diffAlgorithm %> Help "Diff algorithm(s) to test." %+ Default [PatienceDiff]
-    , repoFormat %> Help "Repo formats to test." %+ Default [Darcs2]
+    , diffAlgorithm %> Help "Diff algorithm(s) to test (myers, patience)." %+ \
Default [PatienceDiff] +    , repoFormat %> Help "Repo formats to test (darcs-1, \
darcs-2)." %+ Default [Darcs2]  , tests %> Help "Pattern to limit the tests to run." \
                %+ short 't'
     , testDir %> Help "Directory to run tests in" %+ Default (Nothing :: Maybe \
FilePath)  , plain %> Help "Use plain-text output."


["add-command_line-options-to-control-global-test-options.dpatch" (application/x-darcs-patch)]
["unnamed" (application/octet-stream)]

_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic