From db9a73c84259beb8679a838ed4cd44fbdf45c568 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 19 Nov 2021 21:54:55 -0800 Subject: Lua tests: reset path and cpath when testing 'require' fallback. --- test/Tests/Lua.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') 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 ] -- cgit v1.2.3