aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/api/window_spec.lua4
-rw-r--r--test/functional/helpers.lua1
2 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index 4c867d2f5d..f3ac90de21 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -104,7 +104,7 @@ describe('window_* functions', function()
nvim('set_current_window', nvim('get_windows')[2])
nvim('command', 'split')
eq(window('get_height', nvim('get_windows')[2]),
- window('get_height', nvim('get_windows')[1]) / 2)
+ math.floor(window('get_height', nvim('get_windows')[1]) / 2))
window('set_height', nvim('get_windows')[2], 2)
eq(2, window('get_height', nvim('get_windows')[2]))
end)
@@ -118,7 +118,7 @@ describe('window_* functions', function()
nvim('set_current_window', nvim('get_windows')[2])
nvim('command', 'vsplit')
eq(window('get_width', nvim('get_windows')[2]),
- window('get_width', nvim('get_windows')[1]) / 2)
+ math.floor(window('get_width', nvim('get_windows')[1]) / 2))
window('set_width', nvim('get_windows')[2], 2)
eq(2, window('get_width', nvim('get_windows')[2]))
end)
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 27d8493a12..b758817b41 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -161,6 +161,7 @@ end
local function clear()
if session then
session:request('vim_command', 'qa!')
+ session._async_session._msgpack_stream._loop:exit()
end
local loop = Loop.new()
local msgpack_stream = MsgpackStream.new(loop)