diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2015-12-29 19:23:51 +0000 |
---|---|---|
committer | Seth Jackson <sethjackson@gmail.com> | 2015-12-31 23:28:55 -0500 |
commit | a48508de0dd745cba94debe63f0695447f4ac82f (patch) | |
tree | 9e09bdfb60a017b747990e4dd41e4df6b7e1a45c /test/functional/api/vim_spec.lua | |
parent | 04cd3eef248c174d5092165e558071a3de3aaef0 (diff) | |
download | rneovim-a48508de0dd745cba94debe63f0695447f4ac82f.tar.gz rneovim-a48508de0dd745cba94debe63f0695447f4ac82f.tar.bz2 rneovim-a48508de0dd745cba94debe63f0695447f4ac82f.zip |
test/functional: Fix api/vim_spec.lua.
On Windows the default file format is DOS i.e. newlines are \r\n
instead of \n.
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index cba0b7533b..f4a9ddc698 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3,7 +3,7 @@ local helpers = require('test.functional.helpers') local Screen = require('test.functional.ui.screen') local clear, nvim, eq, neq = helpers.clear, helpers.nvim, helpers.eq, helpers.neq local ok, nvim_async, feed = helpers.ok, helpers.nvim_async, helpers.feed - +local os_is_windows = helpers.os_is_windows describe('vim_* functions', function() before_each(clear) @@ -17,7 +17,11 @@ describe('vim_* functions', function() nvim('command', 'w') local f = io.open(fname) ok(f ~= nil) - eq('testing\napi\n', f:read('*a')) + if os_is_windows() then + eq('testing\r\napi\r\n', f:read('*a')) + else + eq('testing\napi\n', f:read('*a')) + end f:close() os.remove(fname) end) |