blob: e227b9da3dd39717999dadbe9b5c78dfc3140cb5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
local fs = require "nvim-lsp-installer.fs"
local lsp_installer = require "nvim-lsp-installer"
describe("fs", function()
before_each(function()
lsp_installer.settings {
install_root_dir = "/foo",
}
end)
it("refuses to rmrf unsafe paths", function()
local e = assert.has.errors(function()
fs.rmrf "/thisisa/path"
end)
assert.equal("Refusing to operate on path (/thisisa/path) outside of the servers root dir (/foo).", e)
end)
end)
|