aboutsummaryrefslogtreecommitdiffstats
path: root/tests/path_spec.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-05-11 16:10:57 +0200
committerGitHub <noreply@github.com>2022-05-11 16:10:57 +0200
commit5e3385d90668c792919c7e2791620a6c0d569538 (patch)
tree4b0158d3ac7765db47411d57ec754a96f8eaf1f9 /tests/path_spec.lua
parentchore!: remove zeta_note (diff)
downloadmason-5e3385d90668c792919c7e2791620a6c0d569538.tar
mason-5e3385d90668c792919c7e2791620a6c0d569538.tar.gz
mason-5e3385d90668c792919c7e2791620a6c0d569538.tar.bz2
mason-5e3385d90668c792919c7e2791620a6c0d569538.tar.lz
mason-5e3385d90668c792919c7e2791620a6c0d569538.tar.xz
mason-5e3385d90668c792919c7e2791620a6c0d569538.tar.zst
mason-5e3385d90668c792919c7e2791620a6c0d569538.zip
chore: further decouple module structure (#685)
Diffstat (limited to 'tests/path_spec.lua')
-rw-r--r--tests/path_spec.lua23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/path_spec.lua b/tests/path_spec.lua
deleted file mode 100644
index 3ccaf3ad..00000000
--- a/tests/path_spec.lua
+++ /dev/null
@@ -1,23 +0,0 @@
-local path = require "nvim-lsp-installer.path"
-
-describe("path", function()
- it("concatenates paths", function()
- assert.equal("foo/bar/baz/~", path.concat { "foo", "bar", "baz", "~" })
- end)
-
- it("concatenates paths on Windows", function()
- local old_os = jit.os
- jit.os = "windows"
- package.loaded["nvim-lsp-installer.path"] = nil
- local path = require "nvim-lsp-installer.path"
- assert.equal([[foo\bar\baz\~]], path.concat { "foo", "bar", "baz", "~" })
- jit.os = old_os
- end)
-
- it("identifies subdirectories", function()
- assert.is_true(path.is_subdirectory("/foo/bar", "/foo/bar/baz"))
- assert.is_true(path.is_subdirectory("/foo/bar", "/foo/bar"))
- assert.is_false(path.is_subdirectory("/foo/bar", "/foo/bas/baz"))
- assert.is_false(path.is_subdirectory("/foo/bar", "/foo/bars/baz"))
- end)
-end)