summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index ed8f89d..8b7489e 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -2741,6 +2741,55 @@ func Test_wildmenu_pum_odd_wildchar()
call StopVimInTerminal(buf)
endfunc
+" Test that 'rightleft' should not affect cmdline completion popup menu.
+func Test_wildmenu_pum_rightleft()
+ CheckFeature rightleft
+ CheckScreendump
+
+ let lines =<< trim END
+ set wildoptions=pum
+ set rightleft
+ END
+ call writefile(lines, 'Xwildmenu_pum_rl', 'D')
+ let buf = RunVimInTerminal('-S Xwildmenu_pum_rl', #{rows: 10, cols: 50})
+
+ call term_sendkeys(buf, ":sign \<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_rl', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
+" Test highlighting matched text in cmdline completion popup menu.
+func Test_wildmenu_pum_hl_match()
+ CheckScreendump
+
+ let lines =<< trim END
+ set wildoptions=pum,fuzzy
+ hi PmenuMatchSel ctermfg=6 ctermbg=7
+ hi PmenuMatch ctermfg=4 ctermbg=225
+ END
+ call writefile(lines, 'Xwildmenu_pum_hl', 'D')
+ let buf = RunVimInTerminal('-S Xwildmenu_pum_hl', #{rows: 10, cols: 50})
+
+ call term_sendkeys(buf, ":sign plc\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_1', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_2', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_3', {})
+ call term_sendkeys(buf, "\<Esc>:set wildoptions-=fuzzy\<CR>")
+ call TermWait(buf)
+ call term_sendkeys(buf, ":sign un\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_4', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_5', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_6', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ call StopVimInTerminal(buf)
+endfunc
+
" Test for completion after a :substitute command followed by a pipe (|)
" character
func Test_cmdline_complete_substitute()