aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/drop_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/ex_cmds/drop_spec.lua
parent59d117ec99b6037cb9fad5bbfb6d0b18f5012927 (diff)
downloadrneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.gz
rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.bz2
rneovim-04f2f864e270e772c6326cefdf24947f0130e492.zip
refactor: format test/*
Diffstat (limited to 'test/functional/ex_cmds/drop_spec.lua')
-rw-r--r--test/functional/ex_cmds/drop_spec.lua39
1 files changed, 19 insertions, 20 deletions
diff --git a/test/functional/ex_cmds/drop_spec.lua b/test/functional/ex_cmds/drop_spec.lua
index 41f0ada567..c78928f7a1 100644
--- a/test/functional/ex_cmds/drop_spec.lua
+++ b/test/functional/ex_cmds/drop_spec.lua
@@ -3,7 +3,7 @@ local command = helpers.command
local Screen = require('test.functional.ui.screen')
local clear, feed, feed_command = helpers.clear, helpers.feed, helpers.feed_command
-describe(":drop", function()
+describe(':drop', function()
local screen
before_each(function()
@@ -11,16 +11,16 @@ describe(":drop", function()
screen = Screen.new(35, 10)
screen:attach()
screen:set_default_attr_ids({
- [0] = {bold=true, foreground=Screen.colors.Blue},
- [1] = {bold = true, reverse = true},
- [2] = {reverse = true},
- [3] = {bold = true},
+ [0] = { bold = true, foreground = Screen.colors.Blue },
+ [1] = { bold = true, reverse = true },
+ [2] = { reverse = true },
+ [3] = { bold = true },
})
- command("set laststatus=2 shortmess-=F")
+ command('set laststatus=2 shortmess-=F')
end)
- it("works like :e when called with only one window open", function()
- feed_command("drop tmp1.vim")
+ it('works like :e when called with only one window open', function()
+ feed_command('drop tmp1.vim')
screen:expect([[
^ |
{0:~ }|*7
@@ -29,11 +29,11 @@ describe(":drop", function()
]])
end)
- it("switches to an open window showing the buffer", function()
- feed_command("edit tmp1")
- feed_command("vsplit")
- feed_command("edit tmp2")
- feed_command("drop tmp1")
+ it('switches to an open window showing the buffer', function()
+ feed_command('edit tmp1')
+ feed_command('vsplit')
+ feed_command('edit tmp2')
+ feed_command('drop tmp1')
screen:expect([[
│^ |
{0:~ }│{0:~ }|*7
@@ -43,12 +43,12 @@ describe(":drop", function()
end)
it("splits off a new window when a buffer can't be abandoned", function()
- command("set nohidden")
- feed_command("edit tmp1")
- feed_command("vsplit")
- feed_command("edit tmp2")
- feed("iABC<esc>")
- feed_command("drop tmp3")
+ command('set nohidden')
+ feed_command('edit tmp1')
+ feed_command('vsplit')
+ feed_command('edit tmp2')
+ feed('iABC<esc>')
+ feed_command('drop tmp3')
screen:expect([[
^ │ |
{0:~ }│{0:~ }|*3
@@ -59,5 +59,4 @@ describe(":drop", function()
"tmp3" [New] |
]])
end)
-
end)