diff options
author | James McCoy <jamessan@jamessan.com> | 2018-03-28 21:52:06 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2018-03-28 21:54:39 -0400 |
commit | 79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1 (patch) | |
tree | 4e0589d75801f3ff6a9678f84f5009102766661e /test/functional/eval/hostname_spec.lua | |
parent | 4403864da3c48412595d439f36458d1e6ccfc49f (diff) | |
parent | 3f3de9b1a95d273463a87516365510dbffcaf3d2 (diff) | |
download | rneovim-79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1.tar.gz rneovim-79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1.tar.bz2 rneovim-79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1.zip |
Merge branch 'master' into yagebu/option-fixes
Diffstat (limited to 'test/functional/eval/hostname_spec.lua')
-rw-r--r-- | test/functional/eval/hostname_spec.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/eval/hostname_spec.lua b/test/functional/eval/hostname_spec.lua index f1867846c4..6112cf64e3 100644 --- a/test/functional/eval/hostname_spec.lua +++ b/test/functional/eval/hostname_spec.lua @@ -1,17 +1,20 @@ local helpers = require('test.functional.helpers')(after_each) +local eq = helpers.eq local ok = helpers.ok local call = helpers.call local clear = helpers.clear +local iswin = helpers.iswin describe('hostname()', function() before_each(clear) it('returns hostname string', function() local actual = call('hostname') - ok(string.len(actual) > 1) + ok(string.len(actual) > 0) if call('executable', 'hostname') == 1 then local expected = string.gsub(call('system', 'hostname'), '[\n\r]', '') - helpers.eq(expected, actual) + eq((iswin() and expected:upper() or expected), + (iswin() and actual:upper() or actual)) end end) end) |