diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2016-09-17 06:30:36 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-17 06:30:36 +0200 | 
| commit | dc6cc4787c16d2b339699c12136c400c1b3b5cef (patch) | |
| tree | b72a4d85ab76ad7ce4121a15e3d70c9534293e03 /test/functional/eval/api_functions_spec.lua | |
| parent | 3a9da803ccdf77f20c95bb85a047c9ec532e9d1f (diff) | |
| download | rneovim-dc6cc4787c16d2b339699c12136c400c1b3b5cef.tar.gz rneovim-dc6cc4787c16d2b339699c12136c400c1b3b5cef.tar.bz2 rneovim-dc6cc4787c16d2b339699c12136c400c1b3b5cef.zip  | |
api: Establish API naming convention. (#5344)
old name:                   new name:
  --------------------------------------------------
  nvim_name_to_color          nvim_get_color_by_name
  nvim_get_current_buffer     nvim_get_current_buf
  nvim_get_current_window     nvim_get_current_win
  nvim_get_buffers            nvim_list_bufs
  nvim_get_tabpages           nvim_list_tabpages
  nvim_get_windows            nvim_list_wins
  nvim_set_current_buffer     nvim_set_current_buf
  nvim_set_current_window     nvim_set_current_win
  nvim_change_directory       nvim_set_current_dir
  nvim_tabpage_get_window     nvim_tabpage_get_win
  nvim_tabpage_get_windows    nvim_tabpage_list_wins
  nvim_win_get_buffer         nvim_win_get_buf
  nvim_report_error           nvim_err_writeln
Helped-by: Björn Linse <bjorn.linse@gmail.com>
Helped-by: ZyX <kp-pav@yandex.ru>
Helped-by: James McCoy <jamessan@jamessan.com>
Diffstat (limited to 'test/functional/eval/api_functions_spec.lua')
| -rw-r--r-- | test/functional/eval/api_functions_spec.lua | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/test/functional/eval/api_functions_spec.lua b/test/functional/eval/api_functions_spec.lua index d88f6977f1..2ef67e7808 100644 --- a/test/functional/eval/api_functions_spec.lua +++ b/test/functional/eval/api_functions_spec.lua @@ -13,7 +13,7 @@ describe('api functions', function()      execute("call nvim_command('let g:test = 1')")      eq(1, eval("nvim_get_var('test')")) -    local buf = eval("nvim_get_current_buffer()") +    local buf = eval("nvim_get_current_buf()")      execute("call nvim_buf_set_lines("..buf..", 0, -1, v:true, ['aa', 'bb'])")      expect([[        aa @@ -27,8 +27,8 @@ describe('api functions', function()    end)    it("throw errors for invalid arguments", function() -    local err = exc_exec('call nvim_get_current_buffer("foo")') -    eq('Vim(call):E118: Too many arguments for function: nvim_get_current_buffer', err) +    local err = exc_exec('call nvim_get_current_buf("foo")') +    eq('Vim(call):E118: Too many arguments for function: nvim_get_current_buf', err)      err = exc_exec('call nvim_set_option("hlsearch")')      eq('Vim(call):E119: Not enough arguments for function: nvim_set_option', err) @@ -51,17 +51,17 @@ describe('api functions', function()      local screen = Screen.new(40, 8)      screen:attach()      local bnr = eval("bufnr('')") -    local bhnd = eval("nvim_get_current_buffer()") +    local bhnd = eval("nvim_get_current_buf()")      local wid = eval("win_getid()") -    local whnd = eval("nvim_get_current_window()") +    local whnd = eval("nvim_get_current_win()")      eq(bnr, bhnd)      eq(wid, whnd)      execute("new") -- creates new buffer and new window      local bnr2 = eval("bufnr('')") -    local bhnd2 = eval("nvim_get_current_buffer()") +    local bhnd2 = eval("nvim_get_current_buf()")      local wid2 = eval("win_getid()") -    local whnd2 = eval("nvim_get_current_window()") +    local whnd2 = eval("nvim_get_current_win()")      eq(bnr2, bhnd2)      eq(wid2, whnd2)      neq(bnr, bnr2) @@ -70,11 +70,11 @@ describe('api functions', function()      eq(bnr2, eval("nvim_buf_get_number(0)"))      execute("bn") -- show old buffer in new window -    eq(bnr, eval("nvim_get_current_buffer()")) +    eq(bnr, eval("nvim_get_current_buf()"))      eq(bnr, eval("bufnr('')"))      eq(bnr, eval("nvim_buf_get_number(0)"))      eq(wid2, eval("win_getid()")) -    eq(whnd2, eval("nvim_get_current_window()")) +    eq(whnd2, eval("nvim_get_current_win()"))    end)    it("get_lines and set_lines use NL to represent NUL", function()  | 
