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:
Justin M. Keyes
2019-09-04 06:58:04 -07:00
committed by GitHub
parent 9cc8064864
commit 540360a775
7 changed files with 20 additions and 26 deletions

View File

@@ -21,7 +21,7 @@ describe('Test getting and setting file permissions', function()
eq(9, call('len', call('getfperm', tempfile)))
eq(1, call('setfperm', tempfile, 'rwx------'))
if helpers.os_name() == 'windows' then
if helpers.is_os('win') then
eq('rw-rw-rw-', call('getfperm', tempfile))
else
eq('rwx------', call('getfperm', tempfile))