aboutsummaryrefslogtreecommitdiff
path: root/test/functional/example_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-01-03 02:09:18 +0100
committerJustin M. Keyes <justinkz@gmail.com>2024-01-03 02:09:29 +0100
commit04f2f864e270e772c6326cefdf24947f0130e492 (patch)
tree46f83f909b888a66c741032ab955afc6eab84292 /test/functional/example_spec.lua
parent59d117ec99b6037cb9fad5bbfb6d0b18f5012927 (diff)
downloadrneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.gz
rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.bz2
rneovim-04f2f864e270e772c6326cefdf24947f0130e492.zip
refactor: format test/*
Diffstat (limited to 'test/functional/example_spec.lua')
-rw-r--r--test/functional/example_spec.lua29
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)