diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 02:09:18 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 02:09:29 +0100 |
commit | 04f2f864e270e772c6326cefdf24947f0130e492 (patch) | |
tree | 46f83f909b888a66c741032ab955afc6eab84292 /test/functional/ui/title_spec.lua | |
parent | 59d117ec99b6037cb9fad5bbfb6d0b18f5012927 (diff) | |
download | rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.gz rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.bz2 rneovim-04f2f864e270e772c6326cefdf24947f0130e492.zip |
refactor: format test/*
Diffstat (limited to 'test/functional/ui/title_spec.lua')
-rw-r--r-- | test/functional/ui/title_spec.lua | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/test/functional/ui/title_spec.lua b/test/functional/ui/title_spec.lua index 66c0ff5c9c..6f86b61431 100644 --- a/test/functional/ui/title_spec.lua +++ b/test/functional/ui/title_spec.lua @@ -43,13 +43,13 @@ describe('title', function() local buf2 before_each(function() - command('edit '..file1) + command('edit ' .. file1) buf2 = funcs.bufadd(file2) command('set title') end) it('calling setbufvar() to set an option in a hidden buffer from i_CTRL-R', function() - command([[inoremap <F2> <C-R>=setbufvar(]]..buf2..[[, '&autoindent', 1) ?? ''<CR>]]) + command([[inoremap <F2> <C-R>=setbufvar(]] .. buf2 .. [[, '&autoindent', 1) ?? ''<CR>]]) feed('i<F2><Esc>') command('redraw!') screen:expect(function() @@ -66,11 +66,14 @@ describe('title', function() end) it('a Lua callback calling nvim_set_option_value in a hidden buffer', function() - exec_lua(string.format([[ + exec_lua(string.format( + [[ vim.schedule(function() vim.api.nvim_set_option_value('autoindent', true, { buf = %d }) end) - ]], buf2)) + ]], + buf2 + )) command('redraw!') screen:expect(function() eq(expected, screen.title) @@ -78,11 +81,14 @@ describe('title', function() end) it('a Lua callback calling nvim_buf_call in a hidden buffer', function() - exec_lua(string.format([[ + exec_lua(string.format( + [[ vim.schedule(function() vim.api.nvim_buf_call(%d, function() end) end) - ]], buf2)) + ]], + buf2 + )) command('redraw!') screen:expect(function() eq(expected, screen.title) @@ -102,11 +108,15 @@ describe('title', function() it('setting the buffer of another window using Lua callback', function() local oldwin = curwin().id command('split') - exec_lua(string.format([[ + exec_lua(string.format( + [[ vim.schedule(function() vim.api.nvim_win_set_buf(%d, %d) end) - ]], oldwin, buf2)) + ]], + oldwin, + buf2 + )) command('redraw!') screen:expect(function() eq(expected, screen.title) @@ -115,7 +125,11 @@ describe('title', function() it('creating a floating window using RPC', function() meths.open_win(buf2, false, { - relative = 'editor', width = 5, height = 5, row = 0, col = 0, + relative = 'editor', + width = 5, + height = 5, + row = 0, + col = 0, }) command('redraw!') screen:expect(function() @@ -124,11 +138,14 @@ describe('title', function() end) it('creating a floating window using Lua callback', function() - exec_lua(string.format([[ + exec_lua(string.format( + [[ vim.api.nvim_open_win(%d, false, { relative = 'editor', width = 5, height = 5, row = 0, col = 0, }) - ]], buf2)) + ]], + buf2 + )) command('redraw!') screen:expect(function() eq(expected, screen.title) |