test: feed_command is deprecated #33674

This commit is contained in:
Justin M. Keyes
2025-04-27 09:46:53 -07:00
committed by GitHub
parent e991133058
commit ef16a02a76
3 changed files with 57 additions and 60 deletions

View File

@@ -1,7 +1,7 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local clear, feed_command, feed, ok, eval = n.clear, n.feed_command, n.feed, t.ok, n.eval
local clear, ok, eval = n.clear, t.ok, n.eval
describe(':grep', function()
before_each(clear)
@@ -12,11 +12,11 @@ describe(':grep', function()
return
end
feed_command([[set grepprg=grep\ -r]])
n.command([[set grepprg=grep\ -r]])
-- Change to test directory so that the test does not run too long.
feed_command('cd test')
feed_command('grep a **/*')
feed('<cr>') -- Press ENTER
n.command('cd test')
n.feed(':grep a **/*<cr>')
n.feed('<cr>') -- Press ENTER
ok(eval('len(getqflist())') > 9000) -- IT'S OVER 9000!!1
end)
end)