aboutsummaryrefslogtreecommitdiffstats
path: root/tests/core/managers
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-05-27 16:23:51 +0200
committerGitHub <noreply@github.com>2022-05-27 16:23:51 +0200
commitb7813e1ac72271edbb78916d2e87d94a6b0f4039 (patch)
tree4132329e3e3fbf1170501234f0048c971c442fd2 /tests/core/managers
parentrun autogen_metadata.lua (diff)
downloadmason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.tar
mason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.tar.gz
mason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.tar.bz2
mason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.tar.lz
mason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.tar.xz
mason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.tar.zst
mason-b7813e1ac72271edbb78916d2e87d94a6b0f4039.zip
feat: add teal_ls (#724)
Closes #723.
Diffstat (limited to 'tests/core/managers')
-rw-r--r--tests/core/managers/luarocks_spec.lua52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/core/managers/luarocks_spec.lua b/tests/core/managers/luarocks_spec.lua
new file mode 100644
index 00000000..f2836a3f
--- /dev/null
+++ b/tests/core/managers/luarocks_spec.lua
@@ -0,0 +1,52 @@
+local luarocks = require "nvim-lsp-installer.core.managers.luarocks"
+
+describe("luarocks manager", function()
+ it("should parse outdated luarocks", function()
+ assert.same(
+ {
+ {
+ name = "lua-cjson",
+ installed = "2.1.0-1",
+ available = "2.1.0.6-1",
+ repo = "https://luarocks.org",
+ },
+ {
+ name = "lua-resty-influx-mufanh",
+ installed = "0.2.1-0",
+ available = "0.2.1-1",
+ repo = "https://luarocks.org",
+ },
+ },
+ luarocks.parse_outdated_rocks [[lua-cjson 2.1.0-1 2.1.0.6-1 https://luarocks.org
+lua-resty-influx-mufanh 0.2.1-0 0.2.1-1 https://luarocks.org]]
+ )
+ end)
+
+ it("should parse listed luarocks", function()
+ assert.same(
+ {
+ {
+ package = "lua-cjson",
+ version = "2.1.0-1",
+ arch = "installed",
+ nrepo = "/my/luarock/loc",
+ },
+ {
+ package = "lua-resty-http",
+ version = "0.17.0.beta.1-0",
+ arch = "installed",
+ nrepo = "/my/luarock/loc",
+ },
+ {
+ package = "lua-resty-influx-mufanh",
+ version = "0.2.1-0",
+ arch = "installed",
+ nrepo = "/my/luarock/loc",
+ },
+ },
+ luarocks.parse_installed_rocks [[lua-cjson 2.1.0-1 installed /my/luarock/loc
+lua-resty-http 0.17.0.beta.1-0 installed /my/luarock/loc
+lua-resty-influx-mufanh 0.2.1-0 installed /my/luarock/loc]]
+ )
+ end)
+end)