aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-18 06:20:06 +0800
committerGitHub <noreply@github.com>2023-08-18 06:20:06 +0800
commit19d7fb8efeaeb84bc639282de1510b7e8962d49a (patch)
tree70e61646b7c7ea3d12aab1c81802db98fe0b1dfe /test
parent9f7e7455c01718c696e132513fd449235bd4f865 (diff)
downloadrneovim-19d7fb8efeaeb84bc639282de1510b7e8962d49a.tar.gz
rneovim-19d7fb8efeaeb84bc639282de1510b7e8962d49a.tar.bz2
rneovim-19d7fb8efeaeb84bc639282de1510b7e8962d49a.zip
vim-patch:9.0.1734: :runtime completion fails for multiple args (#24767)
Problem: :runtime completion fails for multiple args Solution: Make it work closes: vim/vim#12616 https://github.com/vim/vim/commit/be5cdd1d634c2dfc7e415499fb18f4d246a8721c
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_packadd.vim35
1 files changed, 33 insertions, 2 deletions
diff --git a/test/old/testdir/test_packadd.vim b/test/old/testdir/test_packadd.vim
index 64c8fd8659..332b376bf7 100644
--- a/test/old/testdir/test_packadd.vim
+++ b/test/old/testdir/test_packadd.vim
@@ -388,9 +388,9 @@ func Test_runtime_completion()
call writefile([], optdir . '/../Aunrelated')
exe 'set rtp=' . &packpath . '/runtime'
- func Check_runtime_completion(arg, arg1, res)
+ func Check_runtime_completion(arg, arg_prev, res)
call feedkeys(':runtime ' .. a:arg .. "\<C-A>\<C-B>\"\<CR>", 'xt')
- call assert_equal('"runtime ' .. a:arg1 .. join(a:res), @:)
+ call assert_equal('"runtime ' .. a:arg_prev .. join(a:res), @:)
call assert_equal(a:res, getcompletion(a:arg, 'runtime'))
endfunc
@@ -404,39 +404,70 @@ func Test_runtime_completion()
\ ['PACK'])
call Check_runtime_completion('A', '',
\ ['Aextra/', 'Arunfoo.vim', 'ALL'])
+ call Check_runtime_completion('Other.vim ', 'Other.vim ',
+ \ ['Aextra/', 'Arunfoo.vim'])
call Check_runtime_completion('Aextra/', '',
\ ['Aextra/Arunbar.vim', 'Aextra/Arunbaz/'])
+ call Check_runtime_completion('Other.vim Aextra/', 'Other.vim ',
+ \ ['Aextra/Arunbar.vim', 'Aextra/Arunbaz/'])
call Check_runtime_completion('START ', 'START ',
\ ['Aextra/', 'Astartfoo.vim'])
+ call Check_runtime_completion('START Other.vim ', 'START Other.vim ',
+ \ ['Aextra/', 'Astartfoo.vim'])
call Check_runtime_completion('START A', 'START ',
\ ['Aextra/', 'Astartfoo.vim'])
+ call Check_runtime_completion('START Other.vim A', 'START Other.vim ',
+ \ ['Aextra/', 'Astartfoo.vim'])
call Check_runtime_completion('START Aextra/', 'START ',
\ ['Aextra/Astartbar.vim', 'Aextra/Astartbaz/'])
+ call Check_runtime_completion('START Other.vim Aextra/', 'START Other.vim ',
+ \ ['Aextra/Astartbar.vim', 'Aextra/Astartbaz/'])
call Check_runtime_completion('OPT ', 'OPT ',
\ ['Aextra/', 'Aoptfoo.vim'])
+ call Check_runtime_completion('OPT Other.vim ', 'OPT Other.vim ',
+ \ ['Aextra/', 'Aoptfoo.vim'])
call Check_runtime_completion('OPT A', 'OPT ',
\ ['Aextra/', 'Aoptfoo.vim'])
+ call Check_runtime_completion('OPT Other.vim A', 'OPT Other.vim ',
+ \ ['Aextra/', 'Aoptfoo.vim'])
call Check_runtime_completion('OPT Aextra/', 'OPT ',
\ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/'])
+ call Check_runtime_completion('OPT Other.vim Aextra/', 'OPT Other.vim ',
+ \ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/'])
call Check_runtime_completion('PACK ', 'PACK ',
\ ['Aextra/', 'Aoptfoo.vim', 'Astartfoo.vim'])
+ call Check_runtime_completion('PACK Other.vim ', 'PACK Other.vim ',
+ \ ['Aextra/', 'Aoptfoo.vim', 'Astartfoo.vim'])
call Check_runtime_completion('PACK A', 'PACK ',
\ ['Aextra/', 'Aoptfoo.vim', 'Astartfoo.vim'])
+ call Check_runtime_completion('PACK Other.vim A', 'PACK Other.vim ',
+ \ ['Aextra/', 'Aoptfoo.vim', 'Astartfoo.vim'])
call Check_runtime_completion('PACK Aextra/', 'PACK ',
\ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/',
\ 'Aextra/Astartbar.vim', 'Aextra/Astartbaz/'])
+ call Check_runtime_completion('PACK Other.vim Aextra/', 'PACK Other.vim ',
+ \ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/',
+ \ 'Aextra/Astartbar.vim', 'Aextra/Astartbaz/'])
call Check_runtime_completion('ALL ', 'ALL ',
\ ['Aextra/', 'Aoptfoo.vim', 'Arunfoo.vim', 'Astartfoo.vim'])
+ call Check_runtime_completion('ALL Other.vim ', 'ALL Other.vim ',
+ \ ['Aextra/', 'Aoptfoo.vim', 'Arunfoo.vim', 'Astartfoo.vim'])
call Check_runtime_completion('ALL A', 'ALL ',
\ ['Aextra/', 'Aoptfoo.vim', 'Arunfoo.vim', 'Astartfoo.vim'])
+ call Check_runtime_completion('ALL Other.vim A', 'ALL Other.vim ',
+ \ ['Aextra/', 'Aoptfoo.vim', 'Arunfoo.vim', 'Astartfoo.vim'])
call Check_runtime_completion('ALL Aextra/', 'ALL ',
\ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/',
\ 'Aextra/Arunbar.vim', 'Aextra/Arunbaz/',
\ 'Aextra/Astartbar.vim', 'Aextra/Astartbaz/'])
+ call Check_runtime_completion('ALL Other.vim Aextra/', 'ALL Other.vim ',
+ \ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/',
+ \ 'Aextra/Arunbar.vim', 'Aextra/Arunbaz/',
+ \ 'Aextra/Astartbar.vim', 'Aextra/Astartbaz/'])
delfunc Check_runtime_completion
endfunc