From 54c9176cb82fe1c227978c6df2e2b29f985cbd02 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 22 Apr 2023 22:35:14 +0200 Subject: refactor(schemas): don't vendor schemas in mason.nvim (#1248) Instead, schemas are now defined in the package registry and downloaded during installation. See https://github.com/mason-org/mason-registry/pull/1319. --- tests/mason-core/installer/registry/link_spec.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/mason-core/installer/registry/link_spec.lua b/tests/mason-core/installer/registry/link_spec.lua index 97df3e54..662e1323 100644 --- a/tests/mason-core/installer/registry/link_spec.lua +++ b/tests/mason-core/installer/registry/link_spec.lua @@ -158,8 +158,6 @@ describe("registry linker", function() fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file2" }).returns(true) fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file3" }).returns(true) - ctx.fs.file_exists.on_call_with(match.is_ref(ctx.fs), "v1.0.0-exec.sh").returns(true) - local result = link.share( ctx, { @@ -184,6 +182,13 @@ describe("registry linker", function() }, result ) + + assert.same({ + ["file"] = "v1.0.0-file", + ["dir/file1"] = "v1.0.0/dir/file1", + ["dir/file2"] = "v1.0.0/dir/file2", + ["dir/file3"] = "v1.0.0/dir/file3", + }, ctx.links.share) end) it("should register opt links", function() @@ -201,8 +206,6 @@ describe("registry linker", function() fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file2" }).returns(true) fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file3" }).returns(true) - ctx.fs.file_exists.on_call_with(match.is_ref(ctx.fs), "v1.0.0-exec.sh").returns(true) - local result = link.opt( ctx, { @@ -227,5 +230,12 @@ describe("registry linker", function() }, result ) + + assert.same({ + ["file"] = "v1.0.0-file", + ["dir/file1"] = "v1.0.0/dir/file1", + ["dir/file2"] = "v1.0.0/dir/file2", + ["dir/file3"] = "v1.0.0/dir/file3", + }, ctx.links.opt) end) end) -- cgit v1.2.3-70-g09d2