mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
test: is_os() #10933
- Move os_name() up to "global helpers". - Rename it to is_os(). - Make it depend on uname() instead of a running Nvim instance.
This commit is contained in:
@@ -11,7 +11,7 @@ local iswin = helpers.iswin
|
||||
local meth_pcall = helpers.meth_pcall
|
||||
local meths = helpers.meths
|
||||
local ok, nvim_async, feed = helpers.ok, helpers.nvim_async, helpers.feed
|
||||
local os_name = helpers.os_name
|
||||
local is_os = helpers.is_os
|
||||
local parse_context = helpers.parse_context
|
||||
local request = helpers.request
|
||||
local source = helpers.source
|
||||
@@ -83,7 +83,7 @@ describe('API', function()
|
||||
nvim('command', 'w')
|
||||
local f = io.open(fname)
|
||||
ok(f ~= nil)
|
||||
if os_name() == 'windows' then
|
||||
if is_os('win') then
|
||||
eq('testing\r\napi\r\n', f:read('*a'))
|
||||
else
|
||||
eq('testing\napi\n', f:read('*a'))
|
||||
|
||||
Reference in New Issue
Block a user