aboutsummaryrefslogtreecommitdiff
path: root/test/functional/testnvim.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-08 21:29:20 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-09-09 12:23:54 +0200
commited832b9ddf45705abe9d7f4a50cedc27072c8e16 (patch)
treedaea0210246a4cd204ee89e9850c93cbf054f1f3 /test/functional/testnvim.lua
parent8a2aec99748229ad9d1e12c1cbc0768d063e8eed (diff)
downloadrneovim-ed832b9ddf45705abe9d7f4a50cedc27072c8e16.tar.gz
rneovim-ed832b9ddf45705abe9d7f4a50cedc27072c8e16.tar.bz2
rneovim-ed832b9ddf45705abe9d7f4a50cedc27072c8e16.zip
refactor(test): rename alter_slashes, invert its behavior
- `alter_slashes` belongs in `testutil.lua`, not `testnvim.lua`. - `alter_slashes` is an unusual name. Rename it to `fix_slashes`. - invert its behavior, to emphasize that `/` slashes are the preferred, pervasive convention, not `\` slashes.
Diffstat (limited to 'test/functional/testnvim.lua')
-rw-r--r--test/functional/testnvim.lua20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/functional/testnvim.lua b/test/functional/testnvim.lua
index d74e8055ef..8c8b239cd8 100644
--- a/test/functional/testnvim.lua
+++ b/test/functional/testnvim.lua
@@ -902,26 +902,6 @@ function M.missing_provider(provider)
assert(false, 'Unknown provider: ' .. provider)
end
---- @param obj string|table
---- @return any
-function M.alter_slashes(obj)
- if not is_os('win') then
- return obj
- end
- if type(obj) == 'string' then
- local ret = obj:gsub('/', '\\')
- return ret
- elseif type(obj) == 'table' then
- --- @cast obj table<any,any>
- local ret = {} --- @type table<any,any>
- for k, v in pairs(obj) do
- ret[k] = M.alter_slashes(v)
- end
- return ret
- end
- assert(false, 'expected string or table of strings, got ' .. type(obj))
-end
-
local load_factor = 1
if t.is_ci() then
-- Compute load factor only once (but outside of any tests).