aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-11-19 21:54:55 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-11-19 21:55:14 -0800
commitdb9a73c84259beb8679a838ed4cd44fbdf45c568 (patch)
treec27b1148d0cd31f7822819e44c19f083a29d7248 /test
parentc1a82896c662d320d75db060aa003f6fc1ccf852 (diff)
downloadpandoc-db9a73c84259beb8679a838ed4cd44fbdf45c568.tar.gz
Lua tests: reset path and cpath when testing 'require' fallback.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Lua.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index 5e81cec6a..2070695e3 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -221,11 +221,13 @@ tests = map (localOption (QuickCheckTests 20))
Lua.liftIO $ Lua.OK @=? s
, testCase "module 'lpeg' is available via `require`" . runLuaTest $ do
- s <- Lua.dostring "require 'lpeg'"
+ s <- Lua.dostring
+ "package.path = ''; package.cpath = ''; require 'lpeg'"
Lua.liftIO $ Lua.OK @=? s
, testCase "module 're' is available via `require`" . runLuaTest $ do
- s <- Lua.dostring "require 're'"
+ s <- Lua.dostring
+ "package.path = ''; package.cpath = ''; require 're'"
Lua.liftIO $ Lua.OK @=? s
]