mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #19885 from zeertzjq/vim-8.2.4328
vim-patch:8.2.{4328,4334}: wildmenu tests
This commit is contained in:
commit
72b03792b6
@ -2024,6 +2024,26 @@ func Test_wildmenu_pum()
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_29', {})
|
||||
|
||||
" Check "list" still works
|
||||
call term_sendkeys(buf, "\<C-U>set wildmode=longest,list\<CR>")
|
||||
call term_sendkeys(buf, ":cn\<Tab>")
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
|
||||
call term_sendkeys(buf, "s")
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {})
|
||||
|
||||
" Tests a directory name contained full-width characters.
|
||||
call mkdir('Xdir/あいう', 'p')
|
||||
call writefile([], 'Xdir/あいう/abc')
|
||||
call writefile([], 'Xdir/あいう/xyz')
|
||||
call writefile([], 'Xdir/あいう/123')
|
||||
|
||||
call term_sendkeys(buf, "\<C-U>set wildmode&\<CR>")
|
||||
call term_sendkeys(buf, ":\<C-U>e Xdir/あいう/\<Tab>")
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_32', {})
|
||||
|
||||
call term_sendkeys(buf, "\<C-U>\<CR>")
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xtest')
|
||||
|
0
test/functional/fixtures/wildpum/あいう/123
Normal file
0
test/functional/fixtures/wildpum/あいう/123
Normal file
0
test/functional/fixtures/wildpum/あいう/abc
Normal file
0
test/functional/fixtures/wildpum/あいう/abc
Normal file
0
test/functional/fixtures/wildpum/あいう/xyz
Normal file
0
test/functional/fixtures/wildpum/あいう/xyz
Normal file
@ -2160,6 +2160,55 @@ describe('builtin popupmenu', function()
|
||||
|
||||
feed('<esc>')
|
||||
|
||||
-- Check "list" still works
|
||||
command('set wildmode=longest,list')
|
||||
feed(':cn<Tab>')
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{4: }|
|
||||
:cn |
|
||||
cnewer cnoreabbrev |
|
||||
cnext cnoremap |
|
||||
cnfile cnoremenu |
|
||||
:cn^ |
|
||||
]])
|
||||
feed('s')
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{4: }|
|
||||
:cn |
|
||||
cnewer cnoreabbrev |
|
||||
cnext cnoremap |
|
||||
cnfile cnoremenu |
|
||||
:cns^ |
|
||||
]])
|
||||
|
||||
feed('<esc>')
|
||||
command('set wildmode=full')
|
||||
|
||||
-- Tests a directory name contained full-width characters.
|
||||
feed(':e あいう/<Tab>')
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }{s: 123 }{1: }|
|
||||
{1:~ }{n: abc }{1: }|
|
||||
{1:~ }{n: xyz }{1: }|
|
||||
:e あいう/123^ |
|
||||
]])
|
||||
|
||||
feed('<esc>')
|
||||
|
||||
-- check positioning with multibyte char in pattern
|
||||
command("e långfile1")
|
||||
command("sp långfile2")
|
||||
@ -2229,11 +2278,12 @@ describe('builtin popupmenu', function()
|
||||
:b långfile^ |
|
||||
]])
|
||||
|
||||
-- special case: when patterns ends with "/", show menu items aligned
|
||||
-- after the "/"
|
||||
feed('<esc>')
|
||||
command("close")
|
||||
command('set wildmode=full')
|
||||
|
||||
-- special case: when patterns ends with "/", show menu items aligned
|
||||
-- after the "/"
|
||||
feed(':e compdir/<tab>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
Loading…
Reference in New Issue
Block a user