Minor code cleanup.
This commit is contained in:
parent
0222f367b1
commit
dc93073804
1 changed files with 9 additions and 3 deletions
|
@ -20,9 +20,15 @@ assertPandoc (Block e) (Pandoc _ [g] ) = e @=? g
|
|||
assertPandoc (Blocks e) (Pandoc _ g ) = e @=? g
|
||||
assertPandoc _ _ = assertFailure "Wrong structure of Pandoc document."
|
||||
|
||||
latexTest :: String-> String -> Expect -> Test
|
||||
latexTest :: String -> String -> Expect -> Test
|
||||
latexTest = readerTestWithState defaultParserState readLaTeX
|
||||
|
||||
readerTestWithState :: ParserState -> (ParserState -> String -> Pandoc) -> String -> String -> Expect -> Test
|
||||
readerTestWithState state reader name string exp = testCase name $ exp `assertPandoc` reader state string
|
||||
readerTestWithState :: ParserState
|
||||
-> (ParserState -> String -> Pandoc)
|
||||
-> String
|
||||
-> String
|
||||
-> Expect
|
||||
-> Test
|
||||
readerTestWithState state reader name string e =
|
||||
testCase name $ e `assertPandoc` reader state string
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue