aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2022-12-31 01:30:05 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2022-12-31 01:49:36 +0100
commit69163727e93e5388d6cba9e6c7e1a6e64b9268b7 (patch)
treefa0eb00acf88c3542a27604bd3bd866bccc97121 /test/functional/ui/cmdline_spec.lua
parent935e538b632ba3cb041fb846d2254d92ef981e71 (diff)
downloadrneovim-69163727e93e5388d6cba9e6c7e1a6e64b9268b7.tar.gz
rneovim-69163727e93e5388d6cba9e6c7e1a6e64b9268b7.tar.bz2
rneovim-69163727e93e5388d6cba9e6c7e1a6e64b9268b7.zip
test: add test cases for command line issues
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 1bdd55d66b..8e689fb378 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -1364,4 +1364,40 @@ describe('cmdheight=0', function()
]])
assert_alive()
end)
+
+ it('can only be resized to 0 if set explicitly', function()
+ command('set laststatus=2')
+ command('resize +1')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {2:[No Name] }|
+ |
+ ]])
+ command('set cmdheight=0')
+ command('resize -1')
+ command('resize +1')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {2:[No Name] }|
+ ]])
+ end)
+
+ it("clears cmdline area when resized with external messages", function()
+ clear()
+ screen = new_screen({rgb=true, ext_messages=true})
+ command('set laststatus=2 cmdheight=0')
+ command('resize -1')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {3:[No Name] }|
+ |
+ ]])
+ end)
end)