diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-14 18:09:16 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-14 18:09:16 -0800 |
commit | dc93073804acecaf883d099ef3e1d067a29c9951 (patch) | |
tree | 2b4b201684cf809257bc8a6adb8dabb7a9e93324 /tests/Tests | |
parent | 0222f367b18ac4f77ab76751792c5757c2641d51 (diff) | |
download | pandoc-dc93073804acecaf883d099ef3e1d067a29c9951.tar.gz |
Minor code cleanup.
Diffstat (limited to 'tests/Tests')
-rw-r--r-- | tests/Tests/Helpers.hs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/Tests/Helpers.hs b/tests/Tests/Helpers.hs index e6d3640d9..539b26dcd 100644 --- a/tests/Tests/Helpers.hs +++ b/tests/Tests/Helpers.hs @@ -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 |