diff options
Diffstat (limited to 'tests/core/path_spec.lua')
| -rw-r--r-- | tests/core/path_spec.lua | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/core/path_spec.lua b/tests/core/path_spec.lua deleted file mode 100644 index 3d05fd14..00000000 --- a/tests/core/path_spec.lua +++ /dev/null @@ -1,23 +0,0 @@ -local path = require "mason.core.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["mason.core.path"] = nil - local path = require "mason.core.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) |
