mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
test: rename (meths, funcs) -> (api, fn)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear = helpers.clear
|
||||
local eq = helpers.eq
|
||||
local funcs = helpers.funcs
|
||||
local fn = helpers.fn
|
||||
local command = helpers.command
|
||||
local mkdir = helpers.mkdir
|
||||
|
||||
@@ -11,12 +11,12 @@ describe("'autochdir'", function()
|
||||
|
||||
-- By default 'autochdir' is off, thus getcwd() returns the repo root.
|
||||
clear(targetdir .. '/tty-test.c')
|
||||
local rootdir = funcs.getcwd()
|
||||
local rootdir = fn.getcwd()
|
||||
local expected = rootdir .. '/' .. targetdir
|
||||
|
||||
-- With 'autochdir' on, we should get the directory of tty-test.c.
|
||||
clear('--cmd', 'set autochdir', targetdir .. '/tty-test.c')
|
||||
eq(helpers.is_os('win') and expected:gsub('/', '\\') or expected, funcs.getcwd())
|
||||
eq(helpers.is_os('win') and expected:gsub('/', '\\') or expected, fn.getcwd())
|
||||
end)
|
||||
|
||||
it('is not overwritten by getwinvar() call #17609', function()
|
||||
@@ -29,15 +29,15 @@ describe("'autochdir'", function()
|
||||
command('set shellslash')
|
||||
command('set autochdir')
|
||||
command('edit ' .. dir_a .. '/file1')
|
||||
eq(dir_a, funcs.getcwd())
|
||||
eq(dir_a, fn.getcwd())
|
||||
command('lcd ' .. dir_b)
|
||||
eq(dir_b, funcs.getcwd())
|
||||
eq(dir_b, fn.getcwd())
|
||||
command('botright vnew ../file2')
|
||||
eq(curdir, funcs.getcwd())
|
||||
eq(curdir, fn.getcwd())
|
||||
command('wincmd w')
|
||||
eq(dir_a, funcs.getcwd())
|
||||
funcs.getwinvar(2, 'foo')
|
||||
eq(dir_a, funcs.getcwd())
|
||||
eq(dir_a, fn.getcwd())
|
||||
fn.getwinvar(2, 'foo')
|
||||
eq(dir_a, fn.getcwd())
|
||||
helpers.rmdir(dir_a)
|
||||
helpers.rmdir(dir_b)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user