aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-26 09:44:15 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-01-26 11:55:32 +0800
commit6644786db078e019426f90cf85da50e3fa1b6a67 (patch)
treead044561cd9b9c336ade9661f54e18fcbd9f7e46 /src/nvim/testdir
parent5ac34cf55db2b00c044fa95f75766dd89dd36ba9 (diff)
downloadrneovim-6644786db078e019426f90cf85da50e3fa1b6a67.tar.gz
rneovim-6644786db078e019426f90cf85da50e3fa1b6a67.tar.bz2
rneovim-6644786db078e019426f90cf85da50e3fa1b6a67.zip
vim-patch:9.0.1227: no cmdline completion for :runtime
Problem: No cmdline completion for :runtime. Solution: Add completion for :runtime. (closes vim/vim#11853, closes vim/vim#11447) Improve the resulting matches. https://github.com/vim/vim/commit/a6759381a590b2d395e05b109ca9ccfc356be5a8
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index cf1d56ae38..8f79f0d8a0 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -542,6 +542,15 @@ func Test_getcompletion()
call assert_true(index(l, '<buffer>') >= 0)
let l = getcompletion('not', 'mapclear')
call assert_equal([], l)
+
+ let l = getcompletion('', 'runtime')
+ call assert_true(index(l, 'defaults.vim') >= 0)
+ let l = getcompletion('synt', 'runtime')
+ call assert_true(index(l, 'syntax') >= 0)
+ let l = getcompletion('syntax/vi', 'runtime')
+ call assert_true(index(l, 'syntax/vim.vim') >= 0)
+ let l = getcompletion('notexitsts', 'runtime')
+ call assert_equal([], l)
let l = getcompletion('.', 'shellcmd')
call assert_equal(['./', '../'], filter(l, 'v:val =~ "\\./"'))