aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-06-27 18:28:32 +0200
committerGitHub <noreply@github.com>2018-06-27 18:28:32 +0200
commit363a232cb4e35641036924c9edcc48d476234b59 (patch)
treea3a2d93276ec480f10d14d1a7cd1057c4cbda93b /src/nvim/testdir
parentda6874a7b26976c43115a66180c47d8230dea435 (diff)
parent33eb5833b2baefce3797f4544bc1567d0c23c9e7 (diff)
downloadrneovim-363a232cb4e35641036924c9edcc48d476234b59.tar.gz
rneovim-363a232cb4e35641036924c9edcc48d476234b59.tar.bz2
rneovim-363a232cb4e35641036924c9edcc48d476234b59.zip
Merge #8645 from janlazo/vim-8.0.0677
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim57
1 files changed, 45 insertions, 12 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 85f93cf3da..8d2c61f6f0 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -2169,18 +2169,6 @@ func Test_bufoverflow()
set efm&vim
endfunc
-func Test_cclose_from_copen()
- augroup QF_Test
- au!
- au FileType qf :cclose
- augroup END
- copen
- augroup QF_Test
- au!
- augroup END
- augroup! QF_Test
-endfunc
-
" Tests for getting the quickfix stack size
func XsizeTests(cchar)
call s:setup_commands(a:cchar)
@@ -2209,3 +2197,48 @@ func Test_Qf_Size()
call XsizeTests('c')
call XsizeTests('l')
endfunc
+
+func Test_cclose_from_copen()
+ augroup QF_Test
+ au!
+ au FileType qf :call assert_fails(':cclose', 'E788')
+ augroup END
+ copen
+ augroup QF_Test
+ au!
+ augroup END
+ augroup! QF_Test
+endfunc
+
+func Test_cclose_in_autocmd()
+ " Problem is only triggered if "starting" is zero, so that the OptionsSet
+ " event will be triggered.
+ " call test_override('starting', 1)
+ augroup QF_Test
+ au!
+ au FileType qf :call assert_fails(':cclose', 'E788')
+ augroup END
+ copen
+ augroup QF_Test
+ au!
+ augroup END
+ augroup! QF_Test
+ " call test_override('starting', 0)
+endfunc
+
+func Test_resize_from_copen()
+ augroup QF_Test
+ au!
+ au FileType qf resize 5
+ augroup END
+ try
+ " This should succeed without any exception. No other buffers are
+ " involved in the autocmd.
+ copen
+ finally
+ augroup QF_Test
+ au!
+ augroup END
+ augroup! QF_Test
+ endtry
+endfunc