diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-01-27 00:21:22 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-01-27 00:51:58 +0100 |
commit | 1a3d2dbfe7aadef46b26eac125949a3e1b100194 (patch) | |
tree | 7909cdf506ffab93463a23f6d45a74990d464f70 /test | |
parent | d760e08facda964c04c08d589135cd6b53e16196 (diff) | |
download | rneovim-1a3d2dbfe7aadef46b26eac125949a3e1b100194.tar.gz rneovim-1a3d2dbfe7aadef46b26eac125949a3e1b100194.tar.bz2 rneovim-1a3d2dbfe7aadef46b26eac125949a3e1b100194.zip |
menu_get(): fix query behavior
- Return the menu properties, not only its children.
- If the {path} param is given, return only the first node. The "next"
nodes in the linked-list are irrelevant.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ex_cmds/menu_spec.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/functional/ex_cmds/menu_spec.lua b/test/functional/ex_cmds/menu_spec.lua index 07a40c7a2c..2309e949c0 100644 --- a/test/functional/ex_cmds/menu_spec.lua +++ b/test/functional/ex_cmds/menu_spec.lua @@ -83,7 +83,7 @@ describe('menu_get', function() it("path='', modes='a'", function() local m = funcs.menu_get("","a"); -- HINT: To print the expected table and regenerate the tests: - -- print(require('pl.pretty').dump(m)) + -- print(require('inspect')(m)) local expected = { { shortcut = "T", @@ -310,8 +310,11 @@ describe('menu_get', function() it('matching path, all modes', function() local m = funcs.menu_get("Export", "a") - local expected = { - { + local expected = { { + hidden = 0, + name = "Export", + priority = 500, + submenus = { { tooltip = "This is the tooltip", hidden = 0, name = "Script", @@ -325,8 +328,8 @@ describe('menu_get', function() silent = 0 } } - } - } + } } + } } eq(expected, m) end) |