diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-29 18:02:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-29 18:02:43 -0500 |
| commit | ad98b84008586a1863e8b05b3db6d2c6c7ad4db8 (patch) | |
| tree | 836ddf9beab731ee4bf72cb914f115ebbe5ef139 /src/nvim/testdir | |
| parent | 8950f4e94af1534852cab5f41066d7c21330bd64 (diff) | |
| parent | 1376994f1556b51d6a4feaedc094ee2456db5d06 (diff) | |
| download | rneovim-ad98b84008586a1863e8b05b3db6d2c6c7ad4db8.tar.gz rneovim-ad98b84008586a1863e8b05b3db6d2c6c7ad4db8.tar.bz2 rneovim-ad98b84008586a1863e8b05b3db6d2c6c7ad4db8.zip | |
Merge pull request #13833 from janlazo/vim-8.2.2412
vim-patch:8.2.{2412,2418,2420,2425}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 23 | ||||
| -rw-r--r-- | src/nvim/testdir/test_eval_stuff.vim | 11 | ||||
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 12 | ||||
| -rw-r--r-- | src/nvim/testdir/test_window_cmd.vim | 4 |
4 files changed, 22 insertions, 28 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index c571e37ac3..374ad65aa9 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -1279,26 +1279,9 @@ func Test_TextYankPost() bwipe! endfunc -func Test_nocatch_wipe_all_buffers() - " Real nasty autocommand: wipe all buffers on any event. - au * * bwipe * - call assert_fails('next x', 'E93') - bwipe - au! -endfunc - -func Test_nocatch_wipe_dummy_buffer() - " Nasty autocommand: wipe buffer on any event. - au * x bwipe - call assert_fails('lv½ /x', 'E480') - au! -endfunc - -func Test_wipe_cbuffer() - sv x - au * * bw - lb - au! +func Test_autocommand_all_events() + call assert_fails('au * * bwipe', 'E1155:') + call assert_fails('au * x bwipe', 'E1155:') endfunc " Test TextChangedI and TextChangedP diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index 061364fb73..ff50d53d86 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -22,6 +22,17 @@ func Test_E963() call assert_equal(v_o, v:oldfiles) endfunc +func Test_for_invalid() + call assert_fails("for x in 99", 'E714:') + call assert_fails("for x in 'asdf'", 'E714:') + call assert_fails("for x in {'a': 9}", 'E714:') + + if 0 + /1/5/2/s/\n + endif + redraw +endfunc + func Test_mkdir_p() call mkdir('Xmkdir/nested', 'p') call assert_true(isdirectory('Xmkdir/nested')) diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 48c0a83053..00a253a215 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -3540,7 +3540,7 @@ func Test_lbuffer_crash() sv Xtest augroup QF_Test au! - au * * bw + au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * bw augroup END lbuffer augroup QF_Test @@ -3552,7 +3552,7 @@ endfunc func Test_lexpr_crash() augroup QF_Test au! - au * * call setloclist(0, [], 'f') + au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * call setloclist(0, [], 'f') augroup END lexpr "" augroup QF_Test @@ -3587,7 +3587,7 @@ func Test_lvimgrep_crash() sv Xtest augroup QF_Test au! - au * * call setloclist(0, [], 'f') + au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * call setloclist(0, [], 'f') augroup END lvimgrep quickfix test_quickfix.vim augroup QF_Test @@ -3889,7 +3889,7 @@ func Test_lbuffer_with_bwipe() new new augroup nasty - au * * bwipe + au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * bwipe augroup END lbuffer augroup nasty @@ -3902,9 +3902,9 @@ endfunc func Xexpr_acmd_freelist(cchar) call s:setup_commands(a:cchar) - " This was using freed memory. + " This was using freed memory (but with what events?) augroup nasty - au * * call g:Xsetlist([], 'f') + au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * call g:Xsetlist([], 'f') augroup END Xexpr "x" augroup nasty diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index 687b1cb989..969b75d424 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -513,8 +513,8 @@ func Test_window_colon_command() endfunc func Test_access_freed_mem() - " This was accessing freed memory - au * 0 vs xxx + " This was accessing freed memory (but with what events?) + au BufEnter,BufLeave,WinEnter,WinLeave 0 vs xxx arg 0 argadd all |