diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-04 06:58:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 06:58:04 -0700 |
commit | 540360a775a62db5c2722bfd89b6aa91b577d945 (patch) | |
tree | 9c0d0f5a95da8151468a26964dc2a36b586aa7bc /test/functional/api | |
parent | 9cc8064864374cf85c4273299d42094e3c687941 (diff) | |
download | rneovim-540360a775a62db5c2722bfd89b6aa91b577d945.tar.gz rneovim-540360a775a62db5c2722bfd89b6aa91b577d945.tar.bz2 rneovim-540360a775a62db5c2722bfd89b6aa91b577d945.zip |
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.
Diffstat (limited to 'test/functional/api')
-rw-r--r-- | test/functional/api/server_requests_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/api/vim_spec.lua | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua index ddd044a10f..a20667de40 100644 --- a/test/functional/api/server_requests_spec.lua +++ b/test/functional/api/server_requests_spec.lua @@ -180,7 +180,7 @@ describe('server -> client', function() end) describe('recursive (child) nvim client', function() - if helpers.isCI('travis') and helpers.os_name() == 'osx' then + if helpers.isCI('travis') and helpers.is_os('mac') then -- XXX: Hangs Travis macOS since e9061117a5b8f195c3f26a5cb94e18ddd7752d86. pending("[Hangs on Travis macOS. #5002]", function() end) return @@ -339,7 +339,7 @@ describe('server -> client', function() describe('connecting to its own pipe address', function() it('does not deadlock', function() - if not helpers.isCI('travis') and helpers.os_name() == 'osx' then + if not helpers.isCI('travis') and helpers.is_os('mac') then -- It does, in fact, deadlock on QuickBuild. #6851 pending("deadlocks on QuickBuild", function() end) return diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 07c0c5c8f3..b80b1c87af 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -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')) |