refactor: format test/*

This commit is contained in:
Justin M. Keyes
2024-01-03 02:09:18 +01:00
parent 59d117ec99
commit 04f2f864e2
363 changed files with 30631 additions and 20833 deletions

View File

@@ -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)