diff options
| author | John Szakmeister <john@szakmeister.net> | 2014-11-25 05:36:21 -0500 | 
|---|---|---|
| committer | John Szakmeister <john@szakmeister.net> | 2014-11-25 06:11:43 -0500 | 
| commit | db914e8b6139e111ed0a744f78a704f35e1774ba (patch) | |
| tree | 0b674c09e0bf8dede938258124da99f92585cd6a /test/functional/api/window_spec.lua | |
| parent | bcab2905d83c4b6c0def50462752b1beb5548f10 (diff) | |
| download | rneovim-db914e8b6139e111ed0a744f78a704f35e1774ba.tar.gz rneovim-db914e8b6139e111ed0a744f78a704f35e1774ba.tar.bz2 rneovim-db914e8b6139e111ed0a744f78a704f35e1774ba.zip  | |
Fix broken functional test.
In Lua, all math is floating point.  We need to coerce the result of a
division into a integer with the `{get,set}_height` and
`{get,set}_width` window_spec functional tests.
Diffstat (limited to 'test/functional/api/window_spec.lua')
| -rw-r--r-- | test/functional/api/window_spec.lua | 4 | 
1 files changed, 2 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)  | 
