Mercurial > vim
view src/testdir/test_exit.vim @ 17632:5278e5a2a4e3 v8.1.1813
patch 8.1.1813: ATTENTION prompt for a preview popup window
commit https://github.com/vim/vim/commit/2debf1c16b93f8693a785f675320d9e949c96a97
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 4 20:44:19 2019 +0200
patch 8.1.1813: ATTENTION prompt for a preview popup window
Problem: ATTENTION prompt for a preview popup window.
Solution: Close the popup window if aborting the buffer load. Avoid getting
the ATTENTION dialog.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Aug 2019 20:45:05 +0200 |
parents | 9c90cf08cfa8 |
children | fa6efc49d71f |
line wrap: on
line source
" Tests for exiting Vim. source shared.vim func Test_exiting() let after =<< trim [CODE] au QuitPre * call writefile(["QuitPre"], "Xtestout") au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") quit [CODE] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) endif call delete('Xtestout') let after =<< trim [CODE] au QuitPre * call writefile(["QuitPre"], "Xtestout") au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") help wincmd w quit [CODE] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) endif call delete('Xtestout') let after =<< trim [CODE] au QuitPre * call writefile(["QuitPre"], "Xtestout") au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") split new qall [CODE] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) endif call delete('Xtestout') let after =<< trim [CODE] au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") augroup nasty au ExitPre * split 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