diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-10-22 21:09:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-22 21:09:45 -0700 |
commit | 53b025887e28888f8dba78ff57afc001d1a6428b (patch) | |
tree | 0836a3446072830f061f4c4edbe6b28a26f3f88c /src/nvim/testdir | |
parent | 9e4db2ef508b02583c7f30d12c045ccc07328f16 (diff) | |
parent | c067efa696698d455d9a1488c26e0fb5d8cb5bf5 (diff) | |
download | rneovim-53b025887e28888f8dba78ff57afc001d1a6428b.tar.gz rneovim-53b025887e28888f8dba78ff57afc001d1a6428b.tar.bz2 rneovim-53b025887e28888f8dba78ff57afc001d1a6428b.zip |
Merge #11261 from janlazo/vim-8.1.2185
vim-patch:8.1.{2185,2188,2190,2197}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_exit.vim | 22 | ||||
-rw-r--r-- | src/nvim/testdir/test_syntax.vim | 6 |
2 files changed, 25 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_exit.vim b/src/nvim/testdir/test_exit.vim index 3797626abf..99a401d4a4 100644 --- a/src/nvim/testdir/test_exit.vim +++ b/src/nvim/testdir/test_exit.vim @@ -40,6 +40,7 @@ func Test_exiting() endif call delete('Xtestout') + " ExitPre autocommand splits the window, so that it's no longer the last one. let after =<< trim [CODE] au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") @@ -58,4 +59,25 @@ func Test_exiting() \ readfile('Xtestout')) endif call delete('Xtestout') + + " ExitPre autocommand splits and closes the window, so that there is still + " one window but it's a different one. + let after =<< trim [CODE] + au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") + au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") + augroup nasty + au ExitPre * split | only + augroup END + quit + augroup nasty + au! ExitPre + augroup END + quit + [CODE] + + if RunVim([], after, '') + call assert_equal(['QuitPre', 'ExitPre', 'QuitPre', 'ExitPre'], + \ readfile('Xtestout')) + endif + call delete('Xtestout') endfunc diff --git a/src/nvim/testdir/test_syntax.vim b/src/nvim/testdir/test_syntax.vim index b9310e2168..6cada1503f 100644 --- a/src/nvim/testdir/test_syntax.vim +++ b/src/nvim/testdir/test_syntax.vim @@ -502,9 +502,7 @@ func Test_syntax_c() endif call writefile([ \ '/* comment line at the top */', - \ ' int', - \ 'main(int argc, char **argv)// another comment', - \ '{', + \ 'int main(int argc, char **argv) { // another comment', \ '#if 0', \ ' int not_used;', \ '#else', @@ -519,6 +517,7 @@ func Test_syntax_c() \ ' for (int i = 0; i < count; ++i) {', \ ' break;', \ ' }', + \ " Note: asdf", \ '}', \ ], 'Xtest.c') @@ -527,6 +526,7 @@ func Test_syntax_c() let $COLORFGBG = '15;0' let buf = RunVimInTerminal('Xtest.c', {}) + call term_sendkeys(buf, ":syn keyword Search Note\r") call VerifyScreenDump(buf, 'Test_syntax_c_01', {}) call StopVimInTerminal(buf) |