summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2018-01-12 08:56:33 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2018-01-12 18:54:19 +0100
commit5b852f8d2ad6e2d9713e894bbb80489c1d383847 (patch)
treec526204d36c24935b745f233f119b98d03825ec9 /test
parent624abeec5c3b9f5c27cffe6d157617aa97367e92 (diff)
Lua filters: make PANDOC_READER_OPTIONS available
The options which were used to read the document are made available to Lua filters via the `PANDOC_READER_OPTIONS` global.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Lua.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index 66dc2a6dd..bbce2ac42 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -14,6 +14,7 @@ import Text.Pandoc.Builder (bulletList, divWith, doc, doubleQuoted, emph,
import Text.Pandoc.Class (runIOorExplode, setUserDataDir)
import Text.Pandoc.Definition (Block, Inline, Meta, Pandoc, pandocTypesVersion)
import Text.Pandoc.Lua (runLuaFilter, runPandocLua)
+import Text.Pandoc.Options (def)
import Text.Pandoc.Shared (pandocVersion)
import qualified Foreign.Lua as Lua
@@ -128,7 +129,7 @@ assertFilterConversion :: String -> FilePath -> Pandoc -> Pandoc -> Assertion
assertFilterConversion msg filterPath docIn docExpected = do
docEither <- runIOorExplode $ do
setUserDataDir (Just "../data")
- runLuaFilter ("lua" </> filterPath) [] docIn
+ runLuaFilter def ("lua" </> filterPath) [] docIn
case docEither of
Left _ -> fail "lua filter failed"
Right docRes -> assertEqual msg docExpected docRes