@@ -6,6 +6,7 @@ import Tests.Helpers
66import Text.Pandoc.Class (runIOorExplode)
77import Text.Pandoc.Definition
88import Text.Pandoc.Options
9+import Text.Pandoc.Walk
910import Text.Pandoc.Readers.Docx
1011import Text.Pandoc.Readers.Native
1112import Text.Pandoc.Writers.Docx
@@ -27,7 +28,14 @@ compareOutput (wopts, ropts) nativeFileIn nativeFileOut = do
2728 writeDocx wopts{writerUserDataDir = Just (".." </> "data")} >>=
2829 readDocx ropts
2930 orig <- readNative def nf'
30− return (roundtripped, orig)
31+ return (walk fixImages roundtripped, walk fixImages orig)
32+
33+-- make all image filenames "image", since otherwise round-trip
34+-- tests fail because of different behavior of Data.Unique in
35+-- different ghc versions...
36+fixImages :: Inline -> Inline
37+fixImages (Image attr alt (_,tit)) = Image attr alt ("image",tit)
38+fixImages x = x
3139
3240testCompareWithOptsIO :: Options -> String -> FilePath -> FilePath -> IO TestTree
3341testCompareWithOptsIO opts name nativeFileIn nativeFileOut = do