aboutsummaryrefslogtreecommitdiff
path: root/spec/loader_spec.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: reorganize and speed up unit testsHisham Muhammad2024-02-271-19/+7
|
* loader.which: new option for searching package.path and cpathHisham Muhammad2022-06-061-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Adds a new second argument, `where`, a string which indicates places to search for the module. If `where` contains "l", it will search using the LuaRocks loader; if it contains "p", it will look in the filesystem using package.path and package.cpath. You can use both at the same time. If successful, it will return four values. * If found using the LuaRocks loader, it will return: * filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so"), * rock name * rock version * "l" to indicate the match comes from the loader. * If found scanning package.path and package.cpath, it will return: * filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so"), * "path" or "cpath" * nil * "p" to indicate the match comes from scanning package.path and cpath. If unsuccessful, nothing is returned.
* fix regression in dependency matching of luarocks.loaderHisham Muhammad2020-04-131-0/+64
| | | | | | | | | | | | Regression introduced in https://github.com/luarocks/luarocks/commit/65c417e0ecda55f44c691df032163a8c08f0b52a Thanks to @lhemkendreis for the detailed description and suggested fix, which was applied here! Added a regression test which exercises dependency matching. Closes #1175.
* Tests: add regression test for luarocks.loader startupHisham Muhammad2018-09-111-0/+10