Revert "FB2 reader test: filter CRs."

This reverts commit e35147d715.
This commit is contained in:
John MacFarlane
2019-09-13 22:08:42 -07:00
parent e35147d715
commit 7ecae69e27
+2 -2
View File
@@ -20,14 +20,14 @@ import qualified Data.ByteString as BS
import Text.Pandoc
import Text.Pandoc.UTF8 (toText, fromTextLazy)
import Data.Text (Text)
import qualified Data.Text.Lazy as TL
import Data.Text.Lazy (fromStrict)
import System.FilePath (replaceExtension)
fb2ToNative :: Text -> Text
fb2ToNative = purely (writeNative def{ writerTemplate = Just mempty }) . purely (readFB2 def)
fb2Test :: TestName -> FilePath -> TestTree
fb2Test name path = goldenVsString name native (fromTextLazy . TL.filter (/= '\r') . TL.fromStrict . fb2ToNative . toText <$> BS.readFile path)
fb2Test name path = goldenVsString name native (fromTextLazy . fromStrict . fb2ToNative . toText <$> BS.readFile path)
where native = replaceExtension path ".native"
tests :: [TestTree]