mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 06:18:50 +00:00
test: feed_command is deprecated #33674
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
local t = require('test.testutil')
|
||||
local n = require('test.functional.testnvim')()
|
||||
|
||||
local clear, feed_command, feed = n.clear, n.feed_command, n.feed
|
||||
local clear, feed = n.clear, n.feed
|
||||
local eq, neq, eval = t.eq, t.neq, n.eval
|
||||
|
||||
describe('&encoding', function()
|
||||
@@ -13,10 +13,7 @@ describe('&encoding', function()
|
||||
end)
|
||||
|
||||
it('cannot be changed after setup', function()
|
||||
feed_command('set encoding=latin1')
|
||||
-- error message expected
|
||||
feed('<cr>')
|
||||
neq(nil, string.find(eval('v:errmsg'), '^E519:'))
|
||||
t.matches('E519%:', t.pcall_err(n.command, 'set encoding=latin1'))
|
||||
eq('utf-8', eval('&encoding'))
|
||||
-- check nvim is still in utf-8 mode
|
||||
eq(3, eval('strwidth("Bär")'))
|
||||
@@ -32,7 +29,7 @@ describe('&encoding', function()
|
||||
end)
|
||||
|
||||
it('can be set to utf-8 without error', function()
|
||||
feed_command('set encoding=utf-8')
|
||||
n.command('set encoding=utf-8')
|
||||
eq('', eval('v:errmsg'))
|
||||
|
||||
clear('--cmd', 'set enc=utf-8')
|
||||
|
||||
Reference in New Issue
Block a user