diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 03:05:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-03 03:05:22 -0800 |
commit | a064ed622927b4c5e30165abbe54db841359c71f (patch) | |
tree | 76973648e9ad684068457ff021b4d13281bfad84 /test/functional/example_spec.lua | |
parent | ee2127363463b89ba9d5071babcb9bd16c4db691 (diff) | |
parent | 04f2f864e270e772c6326cefdf24947f0130e492 (diff) | |
download | rneovim-a064ed622927b4c5e30165abbe54db841359c71f.tar.gz rneovim-a064ed622927b4c5e30165abbe54db841359c71f.tar.bz2 rneovim-a064ed622927b4c5e30165abbe54db841359c71f.zip |
Merge #26398 lintlua for test/ dir
Diffstat (limited to 'test/functional/example_spec.lua')
-rw-r--r-- | test/functional/example_spec.lua | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/test/functional/example_spec.lua b/test/functional/example_spec.lua index f07f88b2b6..5e2590542b 100644 --- a/test/functional/example_spec.lua +++ b/test/functional/example_spec.lua @@ -12,12 +12,12 @@ describe('example', function() local screen before_each(function() clear() - screen = Screen.new(20,5) + screen = Screen.new(20, 5) screen:attach() - screen:set_default_attr_ids( { - [0] = {bold=true, foreground=Screen.colors.Blue}, - [1] = {bold=true, foreground=Screen.colors.Brown} - } ) + screen:set_default_attr_ids({ + [0] = { bold = true, foreground = Screen.colors.Blue }, + [1] = { bold = true, foreground = Screen.colors.Brown }, + }) end) it('screen test', function() @@ -47,7 +47,7 @@ describe('example', function() -- For this example, we enable `ext_tabline`: screen:detach() screen = Screen.new(25, 5) - screen:attach({rgb=true, ext_tabline=true}) + screen:attach({ rgb = true, ext_tabline = true }) -- From ":help ui" we find that `tabline_update` receives `curtab` and -- `tabs` objects. So we declare the UI handler like this: @@ -60,13 +60,14 @@ describe('example', function() command('tabedit foo') -- Use screen:expect{condition=…} to check the result. - screen:expect{condition=function() - eq({ id = 2 }, event_curtab) - eq({ - {tab = { id = 1 }, name = '[No Name]'}, - {tab = { id = 2 }, name = 'foo'}, - }, - event_tabs) - end} + screen:expect { + condition = function() + eq({ id = 2 }, event_curtab) + eq({ + { tab = { id = 1 }, name = '[No Name]' }, + { tab = { id = 2 }, name = 'foo' }, + }, event_tabs) + end, + } end) end) |