From 7196607a71a1ab1ef9e40f8eab2f27888c7290c2 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 6 Aug 2015 19:13:18 +0200 Subject: Make it possible to run tests without generating diff. --- html-test/run.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'html-test/run.hs') 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" ] -- cgit v1.2.3