From 2a11b98741d168790cf6fa6798e991b3f78bf314 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Wed, 27 Nov 2024 12:26:00 +0100 Subject: refactor: deprecate `util.path.exists` Use `vim.uv.fs_stat` instead. Work on https://github.com/neovim/nvim-lspconfig/issues/2079. --- test/lspconfig_spec.lua | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'test') diff --git a/test/lspconfig_spec.lua b/test/lspconfig_spec.lua index 36eca3bc..31d03f1d 100644 --- a/test/lspconfig_spec.lua +++ b/test/lspconfig_spec.lua @@ -24,36 +24,6 @@ describe('lspconfig', function() eq('/usr/local/test/\\[sq brackets\\] fname\\?\\*.lua', res) end) end) - describe('exists', function() - it('is present directory', function() - local lspconfig = require 'lspconfig' - - local cwd = vim.fn.getcwd() - eq(true, lspconfig.util.path.exists(cwd) ~= false) - end) - - it('is not present directory', function() - local lspconfig = require 'lspconfig' - local not_exist_dir = vim.fn.getcwd() .. '/not/exists' - eq(true, lspconfig.util.path.exists(not_exist_dir) == false) - end) - - it('is present file', function() - local lspconfig = require 'lspconfig' - -- change the working directory to test directory - vim.api.nvim_command 'cd ./test/test_dir/' - local file = vim.fn.getcwd() .. '/root_marker.txt' - eq(true, lspconfig.util.path.exists(file) ~= false) - end) - - it('is not present file', function() - local lspconfig = require 'lspconfig' - -- change the working directory to test directory - vim.api.nvim_command 'cd ./test/test_dir/' - local file = vim.fn.getcwd() .. '/not_exists.txt' - assert.is_false(lspconfig.util.path.exists(file)) - end) - end) describe('is_dir', function() it('is directory', function() -- cgit v1.2.3-70-g09d2