mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
refactor: format test/*
This commit is contained in:
@@ -30,13 +30,15 @@ describe('K', function()
|
||||
set keywordprg=echo\ fnord>>]])
|
||||
|
||||
-- K on the text "K_spec_out" resolves to `!echo fnord >> K_spec_out`.
|
||||
feed('i'..test_file..'<ESC>K')
|
||||
retry(nil, nil, function() eq(1, eval('filereadable("'..test_file..'")')) end)
|
||||
eq({'fnord'}, eval("readfile('"..test_file.."')"))
|
||||
feed('i' .. test_file .. '<ESC>K')
|
||||
retry(nil, nil, function()
|
||||
eq(1, eval('filereadable("' .. test_file .. '")'))
|
||||
end)
|
||||
eq({ 'fnord' }, eval("readfile('" .. test_file .. "')"))
|
||||
-- Confirm that Neovim is still in terminal mode after K is pressed (#16692).
|
||||
helpers.sleep(500)
|
||||
eq('t', eval('mode()'))
|
||||
feed('<space>') -- Any key, not just <space>, can be used here to escape.
|
||||
feed('<space>') -- Any key, not just <space>, can be used here to escape.
|
||||
eq('n', eval('mode()'))
|
||||
end)
|
||||
|
||||
@@ -60,9 +62,8 @@ describe('K', function()
|
||||
|
||||
it('empty string falls back to :help #19298', function()
|
||||
meths.set_option_value('keywordprg', '', {})
|
||||
meths.buf_set_lines(0, 0, -1, true, {'doesnotexist'})
|
||||
meths.buf_set_lines(0, 0, -1, true, { 'doesnotexist' })
|
||||
feed('K')
|
||||
eq('E149: Sorry, no help for doesnotexist', meths.get_vvar('errmsg'))
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user