aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-10-02 07:03:22 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-04 12:12:16 -0700
commit11baeb88505342c580cc3dd0263c4ba97e6ddb8a (patch)
tree99af3d43ac67422ae1c2bcbc1f32e263b4641566 /test
parent82d587493d97536a64110902f647d953b5f28dd4 (diff)
downloadpandoc-11baeb88505342c580cc3dd0263c4ba97e6ddb8a.tar.gz
OOXML tests: use pretty-printed form to display diffs.
Otherwise everything is on one line and the diff is uninformative.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Writers/OOXML.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Tests/Writers/OOXML.hs b/test/Tests/Writers/OOXML.hs
index fea7fa70f..43543954c 100644
--- a/test/Tests/Writers/OOXML.hs
+++ b/test/Tests/Writers/OOXML.hs
@@ -68,10 +68,10 @@ data XMLDifference
data Comparison a = Comparison { good :: a, mine :: a }
deriving (Show)
-displayDiff :: Content -> Content -> String
+displayDiff :: Element -> Element -> String
displayDiff elemA elemB =
showDiff (1,1)
- (getDiff (lines $ showContent elemA) (lines $ showContent elemB))
+ (getDiff (lines $ ppElement elemA) (lines $ ppElement elemB))
goldenArchive :: FilePath -> IO Archive
goldenArchive fp = toArchive . BL.fromStrict <$> BS.readFile fp
@@ -137,7 +137,7 @@ compareXMLFile' fp goldenArch testArch = do
display difference = "Non-matching xml in "
++ fp ++ ":\n"
++ "* " ++ show difference ++ "\n"
- ++ displayDiff testContent goldenContent
+ ++ displayDiff testXMLDoc goldenXMLDoc
maybe (Right ()) (Left . display) (compareXML goldenContent testContent)