comparison src/testdir/test_cmdline.vim @ 28183:2b595cee4c85 v8.2.4617

patch 8.2.4617: no completion for :scriptnames Commit: https://github.com/vim/vim/commit/454ce6737cadb82886f1fc0eb9e8666cc59ae42b Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Mar 24 11:22:13 2022 +0000 patch 8.2.4617: no completion for :scriptnames Problem: No completion for :scriptnames. Solution: Implement :scriptnames completion. (Yegappan Lakshmanan, closes #10005)
author Bram Moolenaar <Bram@vim.org>
date Thu, 24 Mar 2022 12:30:08 +0100
parents 130f4082a13d
children 553ff405b719
comparison
equal deleted inserted replaced
28182:2846627df454 28183:2b595cee4c85
3255 call assert_equal("\"breakdel here Xtest", @:) 3255 call assert_equal("\"breakdel here Xtest", @:)
3256 call feedkeys(":breakdel here \<Tab>\<C-B>\"\<CR>", 'tx') 3256 call feedkeys(":breakdel here \<Tab>\<C-B>\"\<CR>", 'tx')
3257 call assert_equal("\"breakdel here ", @:) 3257 call assert_equal("\"breakdel here ", @:)
3258 endfunc 3258 endfunc
3259 3259
3260 " Test for :scriptnames argument completion
3261 func Test_cmdline_complete_scriptnames()
3262 set wildmenu
3263 call writefile(['let a = 1'], 'Xa1b2c3.vim')
3264 source Xa1b2c3.vim
3265 call feedkeys(":script \<Tab>\<Left>\<Left>\<C-B>\"\<CR>", 'tx')
3266 call assert_match("\"script .*Xa1b2c3.vim$", @:)
3267 call feedkeys(":script \<Tab>\<Left>\<Left>\<C-B>\"\<CR>", 'tx')
3268 call assert_match("\"script .*Xa1b2c3.vim$", @:)
3269 call feedkeys(":script b2c3\<Tab>\<C-B>\"\<CR>", 'tx')
3270 call assert_equal("\"script b2c3", @:)
3271 call feedkeys(":script 2\<Tab>\<C-B>\"\<CR>", 'tx')
3272 call assert_match("\"script 2\<Tab>$", @:)
3273 call feedkeys(":script \<Tab>\<Left>\<Left> \<Tab>\<C-B>\"\<CR>", 'tx')
3274 call assert_match("\"script .*Xa1b2c3.vim $", @:)
3275 call feedkeys(":script \<Tab>\<Left>\<C-B>\"\<CR>", 'tx')
3276 call assert_equal("\"script ", @:)
3277 call assert_match('Xa1b2c3.vim$', getcompletion('.*Xa1b2.*', 'scriptnames')[0])
3278 call assert_equal([], getcompletion('Xa1b2', 'scriptnames'))
3279 new
3280 call feedkeys(":script \<Tab>\<Left>\<Left>\<CR>", 'tx')
3281 call assert_equal('Xa1b2c3.vim', fnamemodify(@%, ':t'))
3282 bw!
3283 call delete('Xa1b2c3.vim')
3284 set wildmenu&
3285 endfunc
3286
3260 " vim: shiftwidth=2 sts=2 expandtab 3287 " vim: shiftwidth=2 sts=2 expandtab