diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-12-27 22:49:44 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2018-12-27 22:49:44 +0100 |
| commit | c1015121ec626cab6cb384f544bc0be1a1760c0e (patch) | |
| tree | 6cc9a5d1899a4486a24c491e07d17a7dd01f9503 /src/nvim/testdir/test_quickfix.vim | |
| parent | 4f030ec24e0e148bbb83aedaef7dd629e5fef130 (diff) | |
| parent | e1876c7ad1b5e30c0a9919e2c4587d11550c8507 (diff) | |
| download | rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.gz rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.bz2 rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.zip | |
Merge 'upstream/master' into pr-win-erw7
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 624e642e7f..cb3e7ca8f6 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2235,6 +2235,35 @@ func Test_cclose_in_autocmd() " call test_override('starting', 0) endfunc +" Check that ":file" without an argument is possible even when "curbuf_lock" +" is set. +func Test_file_from_copen() + " Works without argument. + augroup QF_Test + au! + au FileType qf file + augroup END + copen + + augroup QF_Test + au! + augroup END + cclose + + " Fails with argument. + augroup QF_Test + au! + au FileType qf call assert_fails(':file foo', 'E788') + augroup END + copen + augroup QF_Test + au! + augroup END + cclose + + augroup! QF_Test +endfunction + func Test_resize_from_copen() augroup QF_Test au! @@ -2608,3 +2637,30 @@ func Test_shorten_fname() silent! clist call assert_equal('test_quickfix.vim', bufname('test_quickfix.vim')) endfunc + +" Test for the position of the quickfix and location list window +func Test_qfwin_pos() + " Open two windows + new | only + new + cexpr ['F1:10:L10'] + copen + " Quickfix window should be the bottom most window + call assert_equal(3, winnr()) + close + " Open at the very top + wincmd t + topleft copen + call assert_equal(1, winnr()) + close + " open left of the current window + wincmd t + below new + leftabove copen + call assert_equal(2, winnr()) + close + " open right of the current window + rightbelow copen + call assert_equal(3, winnr()) + close +endfunc |