1568334840
Neovim's runtimepath searcher outranks package.path, so `make test` on a machine with arti-pack installed tests the installed copy. - Give the repository the first package loader slot in the test harness - Run the suite under `nvim --clean` so site packages stay off the rtp - Assert modules resolve inside the repository, even with a copy on the rtp
22 lines
448 B
Lua
22 lines
448 B
Lua
local root = vim.fn.fnamemodify(debug.getinfo(1, 'S').source:sub(2), ':p:h:h')
|
|
|
|
local hermetic = dofile(root .. '/tests/hermetic.lua')
|
|
package.loaded['tests.hermetic'] = hermetic
|
|
hermetic.install(root)
|
|
|
|
local t = require('tests.harness')
|
|
|
|
for _, name in ipairs({
|
|
'hermetic_spec',
|
|
'spec_spec',
|
|
'fs_spec',
|
|
'archive_spec',
|
|
'lock_spec',
|
|
'installer_spec',
|
|
'init_spec',
|
|
}) do
|
|
require('tests.' .. name)
|
|
end
|
|
|
|
os.exit(t.report() and 0 or 1)
|