Skip to content

Commit db9a73c

Browse files
committed
Lua tests: reset path and cpath when testing 'require' fallback.
1 parent c1a8289 commit db9a73c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/Tests/Lua.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,13 @@ tests = map (localOption (QuickCheckTests 20))
221221
Lua.liftIO $ Lua.OK @=? s
222222

223223
, testCase "module 'lpeg' is available via `require`" . runLuaTest $ do
224-
s <- Lua.dostring "require 'lpeg'"
224+
s <- Lua.dostring
225+
"package.path = ''; package.cpath = ''; require 'lpeg'"
225226
Lua.liftIO $ Lua.OK @=? s
226227

227228
, testCase "module 're' is available via `require`" . runLuaTest $ do
228-
s <- Lua.dostring "require 're'"
229+
s <- Lua.dostring
230+
"package.path = ''; package.cpath = ''; require 're'"
229231
Lua.liftIO $ Lua.OK @=? s
230232
]
231233

0 commit comments

Comments
 (0)