Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 31792:5369ce341633 v9.0.1228
patch 9.0.1228: fuzzy menu completion is only tested in the GUI
Commit: https://github.com/vim/vim/commit/145a6afe3a4be54689af5233710c85346ba1e5da
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Jan 22 12:41:55 2023 +0000
patch 9.0.1228: fuzzy menu completion is only tested in the GUI
Problem: Fuzzy menu completion is only tested in the GUI.
Solution: Make fuzzy menu completion test work without GUI.
(closes #11861)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Jan 2023 13:45:04 +0100 |
parents | 18da1d44878a |
children | 5948cc887603 |
comparison
equal
deleted
inserted
replaced
31791:fb859eafb726 | 31792:5369ce341633 |
---|---|
433 call assert_true(matchcount > 0) | 433 call assert_true(matchcount > 0) |
434 call assert_equal(['File.'], getcompletion('File', 'menu')) | 434 call assert_equal(['File.'], getcompletion('File', 'menu')) |
435 call assert_true(matchcount > 0) | 435 call assert_true(matchcount > 0) |
436 let matchcount = len(getcompletion('File.', 'menu')) | 436 let matchcount = len(getcompletion('File.', 'menu')) |
437 call assert_true(matchcount > 0) | 437 call assert_true(matchcount > 0) |
438 source $VIMRUNTIME/delmenu.vim | |
438 endif | 439 endif |
439 | 440 |
440 let l = getcompletion('v:n', 'var') | 441 let l = getcompletion('v:n', 'var') |
441 call assert_true(index(l, 'v:null') >= 0) | 442 call assert_true(index(l, 'v:null') >= 0) |
442 let l = getcompletion('v:notexists', 'var') | 443 let l = getcompletion('v:notexists', 'var') |
2912 iabbr WaitForCompletion WFC | 2913 iabbr WaitForCompletion WFC |
2913 call feedkeys(":iabbr fcl\<Tab>\<C-B>\"\<CR>", 'tx') | 2914 call feedkeys(":iabbr fcl\<Tab>\<C-B>\"\<CR>", 'tx') |
2914 call assert_equal("\"iabbr WaitForCompletion", @:) | 2915 call assert_equal("\"iabbr WaitForCompletion", @:) |
2915 call feedkeys(":iabbr a1z\<Tab>\<C-B>\"\<CR>", 'tx') | 2916 call feedkeys(":iabbr a1z\<Tab>\<C-B>\"\<CR>", 'tx') |
2916 call assert_equal("\"iabbr a1z\t", @:) | 2917 call assert_equal("\"iabbr a1z\t", @:) |
2918 | |
2917 iunabbrev WaitForCompletion | 2919 iunabbrev WaitForCompletion |
2918 set wildoptions& | 2920 set wildoptions& |
2919 endfunc | 2921 endfunc |
2920 | 2922 |
2921 " menu name fuzzy completion | 2923 " menu name fuzzy completion |
2922 func Test_fuzzy_completion_menu() | 2924 func Test_fuzzy_completion_menu() |
2923 CheckGui | 2925 CheckFeature menu |
2926 | |
2927 source $VIMRUNTIME/menu.vim | |
2924 set wildoptions& | 2928 set wildoptions& |
2925 call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx') | 2929 call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx') |
2926 call assert_equal('"menu pup', @:) | 2930 call assert_equal('"menu pup', @:) |
2927 set wildoptions=fuzzy | 2931 set wildoptions=fuzzy |
2928 call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx') | 2932 call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx') |
2929 call assert_equal('"menu PopUp.', @:) | 2933 call assert_equal('"menu PopUp.', @:) |
2930 set wildoptions& | 2934 |
2935 set wildoptions& | |
2936 source $VIMRUNTIME/delmenu.vim | |
2931 endfunc | 2937 endfunc |
2932 | 2938 |
2933 " :messages suboptions fuzzy completion | 2939 " :messages suboptions fuzzy completion |
2934 func Test_fuzzy_completion_messages() | 2940 func Test_fuzzy_completion_messages() |
2935 set wildoptions& | 2941 set wildoptions& |