From 7ca2d64e8bbfb73f33cf82a2f9c03808bfea3d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Fu=C3=9Fenegger?= Date: Sun, 19 Nov 2023 18:37:49 +0100 Subject: [PATCH] test: skip failing watch file tests on freebsd (#26110) Quick fix as follow up to https://github.com/neovim/neovim/pull/26108 kqueue only reports events on a watched folder itself, not for files created or deleted within. So the approach the PR took doesn't work on FreeBSD. We'll either need to bring back polling for it, combine watching with manual file tracking, or disable LSP file watching on FreeBSD --- test/functional/lua/watch_spec.lua | 1 + test/functional/plugin/lsp_spec.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/test/functional/lua/watch_spec.lua b/test/functional/lua/watch_spec.lua index 711719addb..cdcef08a1a 100644 --- a/test/functional/lua/watch_spec.lua +++ b/test/functional/lua/watch_spec.lua @@ -99,6 +99,7 @@ describe('vim._watch', function() describe('poll', function() it('detects file changes', function() + skip(is_os('bsd'), "bsd only reports rename on folders if file inside change") local root_dir = vim.uv.fs_mkdtemp(vim.fs.dirname(helpers.tmpname()) .. '/nvim_XXXXXXXXXX') local result = exec_lua( diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index bb8d775838..56d31a0e44 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -4026,6 +4026,7 @@ describe('LSP', function() describe('vim.lsp._watchfiles', function() it('sends notifications when files change', function() + skip(is_os('bsd'), "bsd only reports rename on folders if file inside change") local root_dir = helpers.tmpname() os.remove(root_dir) mkdir(root_dir)