aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/testdir/test_cmdline.vim88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 8574573d8c..3aacda6af6 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -902,22 +902,6 @@ func Test_getcmdwin_autocmd()
augroup END
endfunc
-" Test error: "E135: *Filter* Autocommands must not change current buffer"
-func Test_cmd_bang_E135()
- new
- call setline(1, ['a', 'b', 'c', 'd'])
- augroup test_cmd_filter_E135
- au!
- autocmd FilterReadPost * help
- augroup END
- call assert_fails('2,3!echo "x"', 'E135:')
-
- augroup test_cmd_filter_E135
- au!
- augroup END
- %bwipe!
-endfunc
-
func Test_verbosefile()
set verbosefile=Xlog
echomsg 'foo'
@@ -998,34 +982,6 @@ func Test_cmdline_overstrike()
let &encoding = encoding_save
endfunc
-func Test_cmdwin_feedkeys()
- " This should not generate E488
- call feedkeys("q:\<CR>", 'x')
-endfunc
-
-" Tests for the issues fixed in 7.4.441.
-" When 'cedit' is set to Ctrl-C, opening the command window hangs Vim
-func Test_cmdwin_cedit()
- exe "set cedit=\<C-c>"
- normal! :
- call assert_equal(1, winnr('$'))
-
- let g:cmd_wintype = ''
- func CmdWinType()
- let g:cmd_wintype = getcmdwintype()
- let g:wintype = win_gettype()
- return ''
- endfunc
-
- call feedkeys("\<C-c>a\<C-R>=CmdWinType()\<CR>\<CR>")
- echo input('')
- call assert_equal('@', g:cmd_wintype)
- call assert_equal('command', g:wintype)
-
- set cedit&vim
- delfunc CmdWinType
-endfunc
-
func Test_cmdwin_restore()
CheckScreendump
@@ -1102,6 +1058,34 @@ func Test_buffers_lastused()
bwipeout bufc
endfunc
+func Test_cmdwin_feedkeys()
+ " This should not generate E488
+ call feedkeys("q:\<CR>", 'x')
+endfunc
+
+" Tests for the issues fixed in 7.4.441.
+" When 'cedit' is set to Ctrl-C, opening the command window hangs Vim
+func Test_cmdwin_cedit()
+ exe "set cedit=\<C-c>"
+ normal! :
+ call assert_equal(1, winnr('$'))
+
+ let g:cmd_wintype = ''
+ func CmdWinType()
+ let g:cmd_wintype = getcmdwintype()
+ let g:wintype = win_gettype()
+ return ''
+ endfunc
+
+ call feedkeys("\<C-c>a\<C-R>=CmdWinType()\<CR>\<CR>")
+ echo input('')
+ call assert_equal('@', g:cmd_wintype)
+ call assert_equal('command', g:wintype)
+
+ set cedit&vim
+ delfunc CmdWinType
+endfunc
+
" Test for CmdwinEnter autocmd
func Test_cmdwin_autocmd()
CheckFeature cmdwin
@@ -1152,6 +1136,22 @@ func Test_cmdwin_tabpage()
tabclose!
endfunc
+" Test error: "E135: *Filter* Autocommands must not change current buffer"
+func Test_cmd_bang_E135()
+ new
+ call setline(1, ['a', 'b', 'c', 'd'])
+ augroup test_cmd_filter_E135
+ au!
+ autocmd FilterReadPost * help
+ augroup END
+ call assert_fails('2,3!echo "x"', 'E135:')
+
+ augroup test_cmd_filter_E135
+ au!
+ augroup END
+ %bwipe!
+endfunc
+
" test that ";" works to find a match at the start of the first line
func Test_zero_line_search()
new