diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-23 13:25:20 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-23 13:30:23 -0500 |
commit | f0671bf4c7f426a24eeb1a30f3597c17c7b80fd4 (patch) | |
tree | 615ffe0e6620f9d70434b340aa86429edd28c149 /test | |
parent | be929bcc80466623462102a39dd98726bb6c7781 (diff) | |
download | pandoc-f0671bf4c7f426a24eeb1a30f3597c17c7b80fd4.tar.gz |
Powerpoint writer tests: hlint cleanups.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/Powerpoint.hs | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index 694758268..4f14de819 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -30,17 +30,15 @@ compareXMLBool (Elem myElem) (Elem goodElem) , (QName "modified" _ (Just "dcterms")) <- elName goodElem = True compareXMLBool (Elem myElem) (Elem goodElem) = - and [ elName myElem == elName goodElem - , elAttribs myElem == elAttribs goodElem - , and $ - map (uncurry compareXMLBool) $ - zip (elContent myElem) (elContent goodElem) - ] + elName myElem == elName goodElem && + elAttribs myElem == elAttribs goodElem && + and (zipWith compareXMLBool (elContent myElem) (elContent goodElem)) + compareXMLBool (Text myCData) (Text goodCData) = - and [ cdVerbatim myCData == cdVerbatim goodCData - , cdData myCData == cdData goodCData - , cdLine myCData == cdLine goodCData - ] + cdVerbatim myCData == cdVerbatim goodCData && + cdData myCData == cdData goodCData && + cdLine myCData == cdLine goodCData + compareXMLBool (CRef myStr) (CRef goodStr) = myStr == goodStr compareXMLBool _ _ = False @@ -102,10 +100,10 @@ compareXMLFile' fp goldenArch testArch = do Nothing -> Left $ "Can't parse xml in " ++ fp ++ " from archive in stored pptx file" - let testContent = Elem $ testXMLDoc - goldenContent = Elem $ goldenXMLDoc + let testContent = Elem testXMLDoc + goldenContent = Elem goldenXMLDoc - if (compareXMLBool goldenContent testContent) + if compareXMLBool goldenContent testContent then Right () else Left $ "Non-matching xml in " ++ fp ++ ":\n" ++ displayDiff testContent goldenContent @@ -141,7 +139,7 @@ compareMediaFile' fp goldenArch testArch = do Nothing -> Left $ "Can't extract " ++ fp ++ " from archive in stored pptx file" - if (fromEntry testEntry == fromEntry goldenEntry) + if fromEntry testEntry == fromEntry goldenEntry then Right () else Left $ "Non-matching binary file: " ++ fp |