diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-12-01 12:47:05 -0500 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-25 17:07:40 +0100 |
commit | 5ede57122ce61d1504e81c6429ff26c38490aee6 (patch) | |
tree | 1bfb24bda19ee17aa63f795e949b6f65545263fb /tests/Tests/Readers/Markdown.hs | |
parent | 3574b98f81c2c24f7ef31f8251ba88792a2c06f0 (diff) | |
download | pandoc-5ede57122ce61d1504e81c6429ff26c38490aee6.tar.gz |
Update all tests to use new readers and error structure.
Diffstat (limited to 'tests/Tests/Readers/Markdown.hs')
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index 439307dc9..b43a0ec49 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -10,17 +10,17 @@ import qualified Data.Set as Set import Text.Pandoc markdown :: String -> Pandoc -markdown = handleError . readMarkdown def +markdown = purely $ readMarkdown def markdownSmart :: String -> Pandoc -markdownSmart = handleError . readMarkdown def { readerSmart = True } +markdownSmart = purely $ readMarkdown def { readerSmart = True } markdownCDL :: String -> Pandoc -markdownCDL = handleError . readMarkdown def { readerExtensions = Set.insert +markdownCDL = purely $ readMarkdown def { readerExtensions = Set.insert Ext_compact_definition_lists $ readerExtensions def } markdownGH :: String -> Pandoc -markdownGH = handleError . readMarkdown def { readerExtensions = githubMarkdownExtensions } +markdownGH = purely $ readMarkdown def { readerExtensions = githubMarkdownExtensions } infix 4 =: (=:) :: ToString c @@ -29,7 +29,7 @@ infix 4 =: testBareLink :: (String, Inlines) -> Test testBareLink (inp, ils) = - test (handleError . readMarkdown def{ readerExtensions = + test (purely $ readMarkdown def{ readerExtensions = Set.fromList [Ext_autolink_bare_uris, Ext_raw_html] }) inp (inp, doc $ para ils) @@ -303,7 +303,7 @@ tests = [ testGroup "inline code" =?> para (note (para "See [^1]")) ] , testGroup "lhs" - [ test (handleError . readMarkdown def{ readerExtensions = Set.insert + [ test (purely $ readMarkdown def{ readerExtensions = Set.insert Ext_literate_haskell $ readerExtensions def }) "inverse bird tracks and html" $ "> a\n\n< b\n\n<div>\n" |