aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers/Odt.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-01-15 20:42:00 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:42 +0100
commit4f6e6247f9a672770a6d7a55a3aa2709a860ff38 (patch)
treec745fed7bb50d9fdfa6cbcc2ec76b620756e4bd4 /tests/Tests/Readers/Odt.hs
parenta58369a7e650758004975084f984efb2bf3d7d68 (diff)
downloadpandoc-4f6e6247f9a672770a6d7a55a3aa2709a860ff38.tar.gz
Made `smart` extension default for pandoc markdown.
Updated tests.
Diffstat (limited to 'tests/Tests/Readers/Odt.hs')
-rw-r--r--tests/Tests/Readers/Odt.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Tests/Readers/Odt.hs b/tests/Tests/Readers/Odt.hs
index b0e916336..63283497b 100644
--- a/tests/Tests/Readers/Odt.hs
+++ b/tests/Tests/Readers/Odt.hs
@@ -1,18 +1,16 @@
module Tests.Readers.Odt (tests) where
import Control.Monad ( liftM )
-import Text.Pandoc.Options
-import Text.Pandoc.Readers.Native
-import Text.Pandoc.Readers.Markdown
-import Text.Pandoc.Definition
+import Text.Pandoc
import Text.Pandoc.Class (runIO)
import Tests.Helpers
import Test.Framework
import qualified Data.ByteString.Lazy as B
-import Text.Pandoc.Readers.Odt
import Text.Pandoc.Writers.Native (writeNative)
import qualified Data.Map as M
-import Text.Pandoc.Error
+
+defopts :: ReaderOptions
+defopts = def{ readerExtensions = getDefaultExtensions "odt" }
tests :: [Test]
tests = testsComparingToMarkdown ++ testsComparingToNative
@@ -71,7 +69,9 @@ compareOdtToMarkdown :: TestCreator
compareOdtToMarkdown opts odtPath markdownPath = do
markdownFile <- Prelude.readFile markdownPath
odtFile <- B.readFile odtPath
- markdown <- getNoNormVia id "markdown" <$> runIO (readMarkdown opts markdownFile)
+ markdown <- getNoNormVia id "markdown" <$>
+ runIO (readMarkdown def{ readerExtensions = pandocExtensions }
+ markdownFile)
odt <- getNoNormVia id "odt" <$> runIO (readOdt opts odtFile)
return (odt,markdown)
@@ -81,7 +81,7 @@ createTest :: TestCreator
-> FilePath -> FilePath
-> Test
createTest creator name path1 path2 =
- buildTest $ liftM (test id name) (creator def path1 path2)
+ buildTest $ liftM (test id name) (creator defopts path1 path2)
{-
--