diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-02 16:29:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-02 16:29:34 +0100 |
commit | 2d2950198231a31bf87c1cd4322099cc36b0bb93 (patch) | |
tree | a45f361420fb09f8ba52d43d9153ce616b6bee6d /src/testdir/test_ins_complete.vim | |
parent | c5274dd12224421f2430b30c53b881b9403d649e (diff) |
patch 9.0.0027: the command line test is getting quite bigv9.0.0027
Problem: The command line test is getting quite big.
Solution: Move command line window tests to a separate file.
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 20c2b4f48f..baf9ef1711 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -416,100 +416,6 @@ func Test_compl_feedkeys() set completeopt& endfunc -func s:ComplInCmdwin_GlobalCompletion(a, l, p) - return 'global' -endfunc - -func s:ComplInCmdwin_LocalCompletion(a, l, p) - return 'local' -endfunc - -func Test_compl_in_cmdwin() - CheckFeature cmdwin - - set wildmenu wildchar=<Tab> - com! -nargs=1 -complete=command GetInput let input = <q-args> - com! -buffer TestCommand echo 'TestCommand' - let w:test_winvar = 'winvar' - let b:test_bufvar = 'bufvar' - - " User-defined commands - let input = '' - call feedkeys("q:iGetInput T\<C-x>\<C-v>\<CR>", 'tx!') - call assert_equal('TestCommand', input) - - let input = '' - call feedkeys("q::GetInput T\<Tab>\<CR>:q\<CR>", 'tx!') - call assert_equal('T', input) - - - com! -nargs=1 -complete=var GetInput let input = <q-args> - " Window-local variables - let input = '' - call feedkeys("q:iGetInput w:test_\<C-x>\<C-v>\<CR>", 'tx!') - call assert_equal('w:test_winvar', input) - - let input = '' - call feedkeys("q::GetInput w:test_\<Tab>\<CR>:q\<CR>", 'tx!') - call assert_equal('w:test_', input) - - " Buffer-local variables - let input = '' - call feedkeys("q:iGetInput b:test_\<C-x>\<C-v>\<CR>", 'tx!') - call assert_equal('b:test_bufvar', input) - - let input = '' - call feedkeys("q::GetInput b:test_\<Tab>\<CR>:q\<CR>", 'tx!') - call assert_equal('b:test_', input) - - - " Argument completion of buffer-local command - func s:ComplInCmdwin_GlobalCompletionList(a, l, p) - return ['global'] - endfunc - - func s:ComplInCmdwin_LocalCompletionList(a, l, p) - return ['local'] - endfunc - - func s:ComplInCmdwin_CheckCompletion(arg) - call assert_equal('local', a:arg) - endfunc - - com! -nargs=1 -complete=custom,<SID>ComplInCmdwin_GlobalCompletion - \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>) - com! -buffer -nargs=1 -complete=custom,<SID>ComplInCmdwin_LocalCompletion - \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>) - call feedkeys("q:iTestCommand \<Tab>\<CR>", 'tx!') - - com! -nargs=1 -complete=customlist,<SID>ComplInCmdwin_GlobalCompletionList - \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>) - com! -buffer -nargs=1 -complete=customlist,<SID>ComplInCmdwin_LocalCompletionList - \ TestCommand call s:ComplInCmdwin_CheckCompletion(<q-args>) - - call feedkeys("q:iTestCommand \<Tab>\<CR>", 'tx!') - - func! s:ComplInCmdwin_CheckCompletion(arg) - call assert_equal('global', a:arg) - endfunc - new - call feedkeys("q:iTestCommand \<Tab>\<CR>", 'tx!') - quit - - delfunc s:ComplInCmdwin_GlobalCompletion - delfunc s:ComplInCmdwin_LocalCompletion - delfunc s:ComplInCmdwin_GlobalCompletionList - delfunc s:ComplInCmdwin_LocalCompletionList - delfunc s:ComplInCmdwin_CheckCompletion - - delcom -buffer TestCommand - delcom TestCommand - delcom GetInput - unlet w:test_winvar - unlet b:test_bufvar - set wildmenu& wildchar& -endfunc - " Test for insert path completion with completeslash option func Test_ins_completeslash() CheckMSWindows @@ -2191,5 +2097,4 @@ func Test_complete_overrun() bwipe! endfunc - " vim: shiftwidth=2 sts=2 expandtab |