summaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorNathan Gass <gass@search.ch>2011-01-12 19:32:26 +0100
committerNathan Gass <gass@search.ch>2011-01-12 19:32:26 +0100
commit2dadb67b25638a8e51effdae09c6534562f2920e (patch)
treea48b00a627c11690402ef2daccbcfb54a11edad8 /tests/Tests
parentdaf5444e243ad02bbe2b32a77bbc0b1d53e5cf4c (diff)
Generalized latexTestWithState to readerTestWithState.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Shared.hs6
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