Lua tests: reset path and cpath when testing 'require' fallback.

This commit is contained in:
John MacFarlane 2021-11-19 21:54:55 -08:00
parent c1a82896c6
commit db9a73c842

View file

@ -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
]