diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-12 15:09:27 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-12 15:09:27 +0300 |
commit | 3ee45a735727e20e54179c04fe819ca38c54b315 (patch) | |
tree | 73d2d36eb7fdfedf34a359327d84b2c8f3e53343 /test/Tests/Readers | |
parent | bf16a9c78a3e56ac713631c46a34a065e9f9df93 (diff) | |
download | pandoc-3ee45a735727e20e54179c04fe819ca38c54b315.tar.gz |
Muse reader: compare first rewrite to the second in round-trip test
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r-- | test/Tests/Readers/Muse.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index f961083ef..7cb220f03 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -36,14 +36,12 @@ makeRoundTrip (OrderedList (start, UpperAlpha, _) items) = OrderedList (start, D makeRoundTrip x = x -- Demand that any AST produced by Muse reader and written by Muse writer can be read back exactly the same way. --- Currently we remove tables and compare third rewrite to the second. --- First and second rewrites are not equal yet. +-- Currently we remove tables and compare first rewrite to the second. roundTrip :: Block -> Bool -roundTrip b = d'' == d''' +roundTrip b = d' == d'' where d = walk makeRoundTrip $ Pandoc nullMeta [b] d' = rewrite d d'' = rewrite d' - d''' = rewrite d'' rewrite = amuse . T.pack . (++ "\n") . T.unpack . purely (writeMuse def { writerExtensions = extensionsFromList [Ext_amuse] , writerWrapText = WrapPreserve |