diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 03:05:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-03 03:05:22 -0800 |
commit | a064ed622927b4c5e30165abbe54db841359c71f (patch) | |
tree | 76973648e9ad684068457ff021b4d13281bfad84 /test/functional/api/menu_spec.lua | |
parent | ee2127363463b89ba9d5071babcb9bd16c4db691 (diff) | |
parent | 04f2f864e270e772c6326cefdf24947f0130e492 (diff) | |
download | rneovim-a064ed622927b4c5e30165abbe54db841359c71f.tar.gz rneovim-a064ed622927b4c5e30165abbe54db841359c71f.tar.bz2 rneovim-a064ed622927b4c5e30165abbe54db841359c71f.zip |
Merge #26398 lintlua for test/ dir
Diffstat (limited to 'test/functional/api/menu_spec.lua')
-rw-r--r-- | test/functional/api/menu_spec.lua | 29 |
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) |