File tree Expand file tree Collapse file tree 3 files changed +21
-14
lines changed
Expand file tree Collapse file tree 3 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 151514|│ keepscript = false, │
161615|│ name = "MyCommand", │
171716|│ nargs = "0", │
18- 17|│ preview = false, │
19- 18|│ register = false, │
20- 19|│ script_id = -10 │
21- 20|│} │
18+ 17|│ register = false, │
19+ 18|│ script_id = -10 │
20+ 19|│} │
21+ 20|│ │
222221|│ │
232322|│ │
242423|│ │
25- 24|└ Commands ─────────────────────────── 1|2|583 ┘
25+ 24|└ Commands ─────────────────────────── 1|2|585 ┘
262625|
2727
2828--|---------|---------|---------|---------|---------|---------|---------|-----
454517|244444444444444444444444444444444444444444444442111111111111111111111111111
464618|244444444444444444444444444444444444444444444442111111111111111111111111111
474719|244444444444444444444444444444444444444444444442111111111111111111111111111
48- 20|244444444444444444444444444444444444444444444442111111111111111111111111111
48+ 20|255555555555555555555555555555555555555555555552111111111111111111111111111
494921|255555555555555555555555555555555555555555555552111111111111111111111111111
505022|255555555555555555555555555555555555555555555552111111111111111111111111111
515123|255555555555555555555555555555555555555555555552111111111111111111111111111
Original file line number Diff line number Diff line change 151514|│ keepscript = false, │
161615|│ name = "MyCommandBuf", │
171716|│ nargs = "*", │
18- 17|│ preview = false, │
19- 18|│ register = false, │
20- 19|│ script_id = -10 │
21- 20|│} │
18+ 17|│ register = false, │
19+ 18|│ script_id = -10 │
20+ 19|│} │
21+ 20|│ │
222221|│ │
232322|│ │
242423|│ │
25- 24|└ Commands ─────────────────────────── 2|2|583 ┘
25+ 24|└ Commands ─────────────────────────── 2|2|585 ┘
262625|
2727
2828--|---------|---------|---------|---------|---------|---------|---------|-----
454517|244444444444444444444444444444444444444444444442111111111111111111111111111
464618|244444444444444444444444444444444444444444444442111111111111111111111111111
474719|244444444444444444444444444444444444444444444442111111111111111111111111111
48- 20|244444444444444444444444444444444444444444444442111111111111111111111111111
48+ 20|255555555555555555555555555555555555555555555552111111111111111111111111111
494921|255555555555555555555555555555555555555555555552111111111111111111111111111
505022|255555555555555555555555555555555555555555555552111111111111111111111111111
515123|255555555555555555555555555555555555555555555552111111111111111111111111111
Original file line number Diff line number Diff line change @@ -1126,6 +1126,13 @@ T['pickers']['commands()']['works'] = function()
11261126end
11271127
11281128T [' pickers' ][' commands()' ][' respects user commands' ] = function ()
1129+ local expect_screenshot = function (...)
1130+ -- Screenshots are generated for Neovim>=0.12, since the output structure
1131+ -- of `nvim_get_commands()` has changed
1132+ if child .fn .has (' nvim-0.12' ) == 0 then return end
1133+ child .expect_screenshot (... )
1134+ end
1135+
11291136 child .set_size (25 , 75 )
11301137 child .cmd (' command -nargs=0 MyCommand lua _G.my_command = true' )
11311138 child .cmd (' command -nargs=* -buffer MyCommandBuf lua _G.my_command_buf = true' )
@@ -1137,9 +1144,9 @@ T['pickers']['commands()']['respects user commands'] = function()
11371144
11381145 -- Should have proper preview with data
11391146 type_keys (' <Tab>' )
1140- child . expect_screenshot ({ ignore_text = { 24 } })
1147+ expect_screenshot ({ ignore_text = { 24 } })
11411148 type_keys (' <C-n>' )
1142- child . expect_screenshot ({ ignore_text = { 24 } })
1149+ expect_screenshot ({ ignore_text = { 24 } })
11431150
11441151 -- Should on choose execute command if it is without arguments
11451152 type_keys (' <C-p>' , ' <CR>' )
You can’t perform that action at this time.
0 commit comments