diff options
author | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-06 19:13:18 +0200 |
---|---|---|
committer | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-22 23:40:27 +0200 |
commit | 7196607a71a1ab1ef9e40f8eab2f27888c7290c2 (patch) | |
tree | 2b0c66079d60b7b4ea5f9f91149cc7826a9dd02a /html-test | |
parent | 16eb78529ebd0cf438aed500edec2eef6612cbcb (diff) |
Make it possible to run tests without generating diff.
Diffstat (limited to 'html-test')
-rwxr-xr-x | html-test/run.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/html-test/run.hs b/html-test/run.hs index 4103ad04..f57d547a 100755 --- a/html-test/run.hs +++ b/html-test/run.hs @@ -152,7 +152,9 @@ loadConfig flags files = do let cfgHaddockStdOut = fromMaybe "/dev/null" (flagsHaddockStdOut flags) - cfgDiffTool <- (<|>) <$> pure (flagsDiffTool flags) <*> defaultDiffTool + cfgDiffTool <- if FlagNoDiff `elem` flags + then pure Nothing + else (<|>) <$> pure (flagsDiffTool flags) <*> defaultDiffTool return $ Config { .. } @@ -302,6 +304,7 @@ data Flag | FlagHaddockOptions String | FlagHaddockStdOut FilePath | FlagDiffTool FilePath + | FlagNoDiff | FlagHelp deriving Eq @@ -318,6 +321,8 @@ options = "where to redirect Haddock output" , Option [] ["diff-tool"] (ReqArg FlagDiffTool "PATH") "diff tool to use when printing failed cases" + , Option [] ["no-diff"] (NoArg FlagNoDiff) + "do not print diff for failed cases" , Option ['h'] ["help"] (NoArg FlagHelp) "display this help end exit" ] |