summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-29 17:13:19 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-29 17:13:19 +0200
commit5e00cf8086e0960e81c31f7cd981ace646623f09 (patch)
treea2cffda0c28e112169bcdd4056098a4ee8d40299 /test
parent0f658eb46ce3630886b733e8c8ed1086af9b3510 (diff)
Added parameter for user data directory to runLuaFilter.
in Text.Pandoc.Lua. Also to pushPandocModule. This change allows users to override pandoc.lua with a file in their local data directory, adding custom functions, etc. @tarleb, if you think this is a bad idea, you can revert this. But in general our data files are all overridable.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Lua.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index cd8604ab9..ebd39366b 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -68,7 +68,7 @@ tests = map (localOption (QuickCheckTests 20))
assertFilterConversion :: String -> FilePath -> Pandoc -> Pandoc -> Assertion
assertFilterConversion msg filterPath docIn docExpected = do
- docRes <- runLuaFilter ("lua" </> filterPath) [] docIn
+ docRes <- runLuaFilter Nothing ("lua" </> filterPath) [] docIn
assertEqual msg docExpected docRes
roundtripEqual :: (Eq a, Lua.StackValue a) => a -> IO Bool
@@ -78,7 +78,7 @@ roundtripEqual x = (x ==) <$> roundtripped
roundtripped = do
lua <- Lua.newstate
Lua.openlibs lua
- pushPandocModule lua
+ pushPandocModule Nothing lua
Lua.setglobal lua "pandoc"
oldSize <- Lua.gettop lua
Lua.push lua x