aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/lua/glob_spec.lua (renamed from test/functional/plugin/lsp/watchfiles_spec.lua)9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/plugin/lsp/watchfiles_spec.lua b/test/functional/lua/glob_spec.lua
index a8260e0c98..ce38d25e46 100644
--- a/test/functional/plugin/lsp/watchfiles_spec.lua
+++ b/test/functional/lua/glob_spec.lua
@@ -1,14 +1,17 @@
local helpers = require('test.functional.helpers')(after_each)
-
local eq = helpers.eq
local exec_lua = helpers.exec_lua
-describe('vim.lsp._watchfiles', function()
+describe('glob', function()
before_each(helpers.clear)
after_each(helpers.clear)
local match = function(...)
- return exec_lua('return require("vim.lsp._watchfiles")._match(...)', ...)
+ return exec_lua([[
+ local pattern = select(1, ...)
+ local str = select(2, ...)
+ return require("vim.glob").to_lpeg(pattern):match(str) ~= nil
+ ]], ...)
end
describe('glob matching', function()