mirror of
https://github.com/neovim/neovim.git
synced 2025-12-08 07:32:40 +00:00
test: simplify platform detection (#21020)
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.
This commit is contained in:
@@ -71,13 +71,13 @@ describe("backtick expansion", function()
|
||||
end)
|
||||
|
||||
it("with default 'shell'", function()
|
||||
if helpers.iswin() then
|
||||
if helpers.is_os('win') then
|
||||
command(":silent args `dir /b *2`")
|
||||
else
|
||||
command(":silent args `echo ***2`")
|
||||
end
|
||||
eq({ "file2", }, eval("argv()"))
|
||||
if helpers.iswin() then
|
||||
if helpers.is_os('win') then
|
||||
command(":silent args `dir /s/b *4`")
|
||||
eq({ "subdir\\file4", }, eval("map(argv(), 'fnamemodify(v:val, \":.\")')"))
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user