aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/menu_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-09 15:00:41 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-03-09 15:00:41 -0700
commit7a7f497b483cd65e340064f23ed1c73425ecba0a (patch)
treed5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /test/functional/api/menu_spec.lua
parent1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff)
parentade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff)
downloadrneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz
rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2
rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'test/functional/api/menu_spec.lua')
-rw-r--r--test/functional/api/menu_spec.lua29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/functional/api/menu_spec.lua b/test/functional/api/menu_spec.lua
index 34a92477f3..44b9039393 100644
--- a/test/functional/api/menu_spec.lua
+++ b/test/functional/api/menu_spec.lua
@@ -5,8 +5,7 @@ local clear = helpers.clear
local command = helpers.command
local feed = helpers.feed
-describe("update_menu notification", function()
-
+describe('update_menu notification', function()
local screen
before_each(function()
@@ -16,23 +15,26 @@ describe("update_menu notification", function()
end)
local function expect_sent(expected)
- screen:expect{condition=function()
- if screen.update_menu ~= expected then
- if expected then
- error('update_menu was expected but not sent')
- else
- error('update_menu was sent unexpectedly')
+ screen:expect {
+ condition = function()
+ if screen.update_menu ~= expected then
+ if expected then
+ error('update_menu was expected but not sent')
+ else
+ error('update_menu was sent unexpectedly')
+ end
end
- end
- end, unchanged=(not expected)}
+ end,
+ unchanged = not expected,
+ }
end
- it("should be sent when adding a menu", function()
+ it('should be sent when adding a menu', function()
command('menu Test.Test :')
expect_sent(true)
end)
- it("should be sent when deleting a menu", function()
+ it('should be sent when deleting a menu', function()
command('menu Test.Test :')
screen.update_menu = false
@@ -40,9 +42,8 @@ describe("update_menu notification", function()
expect_sent(true)
end)
- it("should not be sent unnecessarily", function()
+ it('should not be sent unnecessarily', function()
feed('i12345<ESC>:redraw<CR>')
expect_sent(false)
end)
-
end)