aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYochem van Rosmalen <git@yochem.nl>2024-11-04 15:06:18 +0100
committerGitHub <noreply@github.com>2024-11-04 06:06:18 -0800
commit079e5f4f9b67a5aa2c1b481ce78711bf8c76caea (patch)
tree9553e0f74265904d0e9f1552609d39ed17ffc90e /test
parenta27419f3fc540f66567f4559a796cd6758f1bb1f (diff)
downloadrneovim-079e5f4f9b67a5aa2c1b481ce78711bf8c76caea.tar.gz
rneovim-079e5f4f9b67a5aa2c1b481ce78711bf8c76caea.tar.bz2
rneovim-079e5f4f9b67a5aa2c1b481ce78711bf8c76caea.zip
feat(defaults): unimpaired empty line below/above cursor #30984
Diffstat (limited to 'test')
-rw-r--r--test/functional/editor/defaults_spec.lua48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/functional/editor/defaults_spec.lua b/test/functional/editor/defaults_spec.lua
index 70f12ab475..9786bfeaac 100644
--- a/test/functional/editor/defaults_spec.lua
+++ b/test/functional/editor/defaults_spec.lua
@@ -152,6 +152,54 @@ describe('default', function()
]],
})
end)
+
+ describe('[<Space>', function()
+ it('adds an empty line above the current line', function()
+ n.clear({ args_rm = { '--cmd' } })
+ n.insert([[first line]])
+ n.feed('[<Space>')
+ n.expect([[
+
+ first line]])
+ end)
+
+ it('works with a count', function()
+ n.clear({ args_rm = { '--cmd' } })
+ n.insert([[first line]])
+ n.feed('5[<Space>')
+ n.expect([[
+
+
+
+
+
+ first line]])
+ end)
+ end)
+
+ describe(']<Space>', function()
+ it('adds an empty line below the current line', function()
+ n.clear({ args_rm = { '--cmd' } })
+ n.insert([[first line]])
+ n.feed(']<Space>')
+ n.expect([[
+ first line
+ ]])
+ end)
+
+ it('works with a count', function()
+ n.clear({ args_rm = { '--cmd' } })
+ n.insert([[first line]])
+ n.feed('5]<Space>')
+ n.expect([[
+ first line
+
+
+
+
+ ]])
+ end)
+ end)
end)
end)
end)