Add shell.package_path

This commit is contained in:
JackMacWindows 2023-12-30 20:26:40 -05:00 committed by GitHub
parent 19093c2aad
commit 9c28129b11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -79,5 +79,12 @@ describe("cc.require", function()
" [^:]*some_module.lua:1: unexpected symbol near '1'$"
)
end)
it("uses shell.package_path for package loading", function()
setup("test-files/some_module.lua", "return 123")
settings.set("shell.package_path", "/test_files/?.lua")
local require, package = mk()
expect(require("some_module")):eq(123)
end)
end)
end)