mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
test: use vim.mpack and vim.uv directly
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
|
||||
local luv = require('luv')
|
||||
|
||||
local eq = helpers.eq
|
||||
local clear = helpers.clear
|
||||
local funcs = helpers.funcs
|
||||
@@ -87,7 +85,7 @@ describe('bufname() function', function()
|
||||
it('returns expected buffer name', function()
|
||||
eq('', funcs.bufname('%')) -- Buffer has no name yet
|
||||
command('file ' .. fname)
|
||||
local wd = luv.cwd()
|
||||
local wd = vim.uv.cwd()
|
||||
local sep = get_pathsep()
|
||||
local curdirname = funcs.fnamemodify(wd, ':t')
|
||||
for _, arg in ipairs({ '%', 1, 'X', wd }) do
|
||||
@@ -120,7 +118,7 @@ describe('bufnr() function', function()
|
||||
it('returns expected buffer number', function()
|
||||
eq(1, funcs.bufnr('%'))
|
||||
command('file ' .. fname)
|
||||
local wd = luv.cwd()
|
||||
local wd = vim.uv.cwd()
|
||||
local curdirname = funcs.fnamemodify(wd, ':t')
|
||||
eq(1, funcs.bufnr(fname))
|
||||
eq(1, funcs.bufnr(wd))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local luv = require('luv')
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear, command, eval, eq = helpers.clear, helpers.command, helpers.eval, helpers.eq
|
||||
local mkdir = helpers.mkdir
|
||||
@@ -12,7 +11,7 @@ before_each(function()
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
luv.fs_rmdir('test-glob')
|
||||
vim.uv.fs_rmdir('test-glob')
|
||||
end)
|
||||
|
||||
describe('glob()', function()
|
||||
|
||||
@@ -62,8 +62,7 @@ describe('has()', function()
|
||||
end)
|
||||
|
||||
it('"wsl"', function()
|
||||
local luv = require('luv')
|
||||
local is_wsl = luv.os_uname()['release']:lower():match('microsoft') and true or false
|
||||
local is_wsl = vim.uv.os_uname()['release']:lower():match('microsoft') and true or false
|
||||
if is_wsl then
|
||||
eq(1, funcs.has('wsl'))
|
||||
else
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local luv = require('luv')
|
||||
|
||||
local mkdir = helpers.mkdir
|
||||
local clear = helpers.clear
|
||||
@@ -28,8 +27,8 @@ end)
|
||||
after_each(function()
|
||||
os.remove(fname)
|
||||
os.remove(dfname)
|
||||
luv.fs_rmdir(ddname)
|
||||
luv.fs_rmdir(dname)
|
||||
vim.uv.fs_rmdir(ddname)
|
||||
vim.uv.fs_rmdir(dname)
|
||||
end)
|
||||
|
||||
describe('writefile()', function()
|
||||
|
||||
Reference in New Issue
Block a user