File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ {-# LANGUAGE NoImplicitPrelude #-}
2+ {-# LANGUAGE OverloadedStrings #-}
3+ module Tests.Writers.SILE (tests ) where
4+
5+ import Prelude
6+ import Data.Text (unpack )
7+ import Test.Tasty
8+ import Tests.Helpers
9+ import Text.Pandoc
10+ import Text.Pandoc.Arbitrary ()
11+ import Text.Pandoc.Builder
12+
13+ sile :: (ToPandoc a ) => a -> String
14+ sile = sileWithOpts def
15+
16+ sileWithOpts :: (ToPandoc a ) => WriterOptions -> a -> String
17+ sileWithOpts opts = unpack . purely (writeSILE opts) . toPandoc
18+
19+ {-
20+ "my test" =: X =?> Y
21+
22+ is shorthand for
23+
24+ test sile "my test" $ X =?> Y
25+
26+ which is in turn shorthand for
27+
28+ test sile "my test" (X,Y)
29+ -}
30+
31+ infix 4 =:
32+ (=:) :: (ToString a , ToPandoc a )
33+ => String -> (a , String ) -> TestTree
34+ (=:) = test sile
35+
36+ tests :: [TestTree ]
37+ tests = []
You can’t perform that action at this time.
0 commit comments