diff options
author | Nathan Gass <gass@search.ch> | 2011-01-12 19:32:26 +0100 |
---|---|---|
committer | Nathan Gass <gass@search.ch> | 2011-01-12 19:32:26 +0100 |
commit | 2dadb67b25638a8e51effdae09c6534562f2920e (patch) | |
tree | a48b00a627c11690402ef2daccbcfb54a11edad8 | |
parent | daf5444e243ad02bbe2b32a77bbc0b1d53e5cf4c (diff) | |
download | pandoc-2dadb67b25638a8e51effdae09c6534562f2920e.tar.gz |
Generalized latexTestWithState to readerTestWithState.
-rw-r--r-- | tests/Tests/Shared.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs index 3cf8d5689..f5b13986d 100644 --- a/tests/Tests/Shared.hs +++ b/tests/Tests/Shared.hs @@ -19,8 +19,8 @@ assertPandoc (Blocks e) (Pandoc _ g ) = e @=? g assertPandoc _ _ = assertFailure "Wrong structure of Pandoc document." latexTest :: String-> String -> Expect -> Test -latexTest = latexTestWithState defaultParserState +latexTest = readerTestWithState defaultParserState readLaTeX -latexTestWithState :: ParserState -> String -> String -> Expect -> Test -latexTestWithState state name string exp = testCase name $ exp `assertPandoc` readLaTeX state string +readerTestWithState :: ParserState -> (ParserState -> String -> Pandoc) -> String -> String -> Expect -> Test +readerTestWithState state reader name string exp = testCase name $ exp `assertPandoc` reader state string |