aboutsummaryrefslogtreecommitdiff
path: root/test/testutil.lua
diff options
context:
space:
mode:
authorMike <4576770+mike325@users.noreply.github.com>2025-01-15 01:39:17 +0100
committerGitHub <noreply@github.com>2025-01-14 16:39:17 -0800
commit611ef354919f1c6564efd2ff8074545941458ccc (patch)
treee4fe577188f7e05f8c618c3a9f271a48b0ef2f7c /test/testutil.lua
parente8a6c1b02122852da83dc52184e78369598d8240 (diff)
downloadrneovim-611ef354919f1c6564efd2ff8074545941458ccc.tar.gz
rneovim-611ef354919f1c6564efd2ff8074545941458ccc.tar.bz2
rneovim-611ef354919f1c6564efd2ff8074545941458ccc.zip
feat(vim.fs): find(), dir() can "follow" symlinks #31551
Problem: vim.fs.dir(), vim.fs.find() do not follow symlinks. Solution: - Add "follow" flag. - Enable it by default.
Diffstat (limited to 'test/testutil.lua')
-rw-r--r--test/testutil.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testutil.lua b/test/testutil.lua
index 3226bfeb1e..e69dcae120 100644
--- a/test/testutil.lua
+++ b/test/testutil.lua
@@ -388,15 +388,18 @@ end
local sysname = uv.os_uname().sysname:lower()
---- @param s 'win'|'mac'|'freebsd'|'openbsd'|'bsd'
+--- @param s 'win'|'mac'|'linux'|'freebsd'|'openbsd'|'bsd'
--- @return boolean
function M.is_os(s)
- if not (s == 'win' or s == 'mac' or s == 'freebsd' or s == 'openbsd' or s == 'bsd') then
+ if
+ not (s == 'win' or s == 'mac' or s == 'linux' or s == 'freebsd' or s == 'openbsd' or s == 'bsd')
+ then
error('unknown platform: ' .. tostring(s))
end
return not not (
(s == 'win' and (sysname:find('windows') or sysname:find('mingw')))
or (s == 'mac' and sysname == 'darwin')
+ or (s == 'linux' and sysname == 'linux')
or (s == 'freebsd' and sysname == 'freebsd')
or (s == 'openbsd' and sysname == 'openbsd')
or (s == 'bsd' and sysname:find('bsd'))