summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlanZimmerman <>2018-03-11 10:47:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-03-11 10:47:00 (GMT)
commitb6934f22d6668ed1ee60bca7a5382e4288426984 (patch)
tree07b8df6824dde2367389b893823a9860bb7a2dde /tests
parentce330ddf61c1499bd4de7b358965523ce2943248 (diff)
version 0.5.6.10.5.6.1
Diffstat (limited to 'tests')
-rw-r--r--tests/Roundtrip.hs6
-rw-r--r--tests/Static.hs4
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/Roundtrip.hs b/tests/Roundtrip.hs
index ffab633..e16ac8b 100644
--- a/tests/Roundtrip.hs
+++ b/tests/Roundtrip.hs
@@ -13,7 +13,7 @@ import System.Environment
import System.Exit
import System.FilePath
import System.IO
-import System.IO.Temp
+-- import System.IO.Temp
import Test.Common
import Test.CommonUtils
import Test.HUnit
@@ -31,6 +31,7 @@ verb = Debug
writeCPP :: FilePath -> IO ()
writeCPP fp = appendFileFlush cppFile (('\n' : fp))
+writeError :: FilePath -> IO ()
writeError = writeCPP
writeParseFail :: FilePath -> String -> IO ()
@@ -62,6 +63,7 @@ appendFileFlush f txt = withFile f AppendMode (\ hdl -> hPutStr hdl txt >> hFlus
-- ---------------------------------------------------------------------
+readFileIfPresent :: FilePath -> IO [String]
readFileIfPresent fileName = do
isPresent <- doesFileExist fileName
if isPresent
@@ -100,7 +102,7 @@ main = do
!parseFailList <- lines <$> readFile parseFailFile
let done = S.fromList (processedList ++ cppList ++ blackList ++ knownFailures ++ parseFailList)
tsts <- TestList <$> mapM (tests done) ds
- runTests tsts
+ _ <- runTests tsts
return ()
runTests :: Test -> IO Counts
diff --git a/tests/Static.hs b/tests/Static.hs
index c891a74..46ac987 100644
--- a/tests/Static.hs
+++ b/tests/Static.hs
@@ -54,7 +54,6 @@ page :: (FilePath, FilePath, FilePath) -> Failure -> IO ()
page (prev, out, next) (Failure res fname) = do
-- traceM out
original <- readFile fname
- -- let diff = getDiff (tokenize original) (tokenize res)
let lres = lines res
let maxLines = 50000
let diff = getGroupedDiff (lines original) (take maxLines lres)
@@ -67,9 +66,6 @@ page (prev, out, next) (Failure res fname) = do
else
-- writeFile ("failures" </> out) (mkPage (ppDiff diff) prev next original res)
writeFile (failuresHtmlDir </> out) (mkPage fname (ppDiff diff) prev next original res)
- where
- tokenize :: String -> [[String]]
- -- tokenize s = map (:[]) . lines $ s
mkPage :: FilePath -> String -> String -> String -> String -> String -> String
mkPage filename diff prev next original printed =