git.iko.soy/typeable/pandoc
on master help sign in
Muse writer tests: compare Text without converting to [Char]
2b2d9baAlexander Krotov
test/Tests/Writers/Muse.hs+6−6
@@ -2,8 +2,8 @@
2{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Tests.Writers.Muse (tests) where
3module Tests.Writers.Muse (tests) where
4
4
5−import Prelude
5+import Prelude hiding (unlines)
6−import Data.Text (unpack)
6+import Data.Text (Text, unlines)
7import Test.Tasty
7import Test.Tasty
8import Tests.Helpers
8import Tests.Helpers
9import Text.Pandoc
9import Text.Pandoc
@@ -15,15 +15,15 @@ defopts = def{ writerWrapText = WrapPreserve,
15 writerExtensions = extensionsFromList [Ext_amuse,
15 writerExtensions = extensionsFromList [Ext_amuse,
16 Ext_auto_identifiers] }
16 Ext_auto_identifiers] }
17
17
18−muse :: (ToPandoc a) => a -> String
18+muse :: (ToPandoc a) => a -> Text
19muse = museWithOpts defopts
19muse = museWithOpts defopts
20
20
21−museWithOpts :: (ToPandoc a) => WriterOptions -> a -> String
21+museWithOpts :: (ToPandoc a) => WriterOptions -> a -> Text
22−museWithOpts opts = unpack . purely (writeMuse opts) . toPandoc
22+museWithOpts opts = purely (writeMuse opts) . toPandoc
23
23
24infix 4 =:
24infix 4 =:
25(=:) :: (ToString a, ToPandoc a)
25(=:) :: (ToString a, ToPandoc a)
26− => String -> (a, String) -> TestTree
26+ => String -> (a, Text) -> TestTree
27(=:) = test muse
27(=:) = test muse
28
28
29noteLocationTestDoc :: Blocks
29noteLocationTestDoc :: Blocks