aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_filechanged.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-02 12:25:07 +0800
committerGitHub <noreply@github.com>2022-07-02 12:25:07 +0800
commita9de89894a2ff43dd511b38f20ab2815d6c7e2bd (patch)
tree8c6da1a08e4bb88f876e93bb6fc6d24461cff93e /src/nvim/testdir/test_filechanged.vim
parentf71d518c90b46dd7c53d151a59ff9a5236589f64 (diff)
parent727754377281aa442767c0ad9c25fec7dd2533ab (diff)
downloadrneovim-a9de89894a2ff43dd511b38f20ab2815d6c7e2bd.tar.gz
rneovim-a9de89894a2ff43dd511b38f20ab2815d6c7e2bd.tar.bz2
rneovim-a9de89894a2ff43dd511b38f20ab2815d6c7e2bd.zip
Merge pull request #19202 from zeertzjq/vim-8.2.0316
vim-patch:8.2.{0261,0316}: insufficient test coverage
Diffstat (limited to 'src/nvim/testdir/test_filechanged.vim')
-rw-r--r--src/nvim/testdir/test_filechanged.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_filechanged.vim b/src/nvim/testdir/test_filechanged.vim
index 8e1cb2c3ee..1b0f49ca51 100644
--- a/src/nvim/testdir/test_filechanged.vim
+++ b/src/nvim/testdir/test_filechanged.vim
@@ -245,3 +245,19 @@ func Test_file_changed_dialog()
bwipe!
call delete('Xchanged_d')
endfunc
+
+" Test for editing a new buffer from a FileChangedShell autocmd
+func Test_FileChangedShell_newbuf()
+ call writefile(['one', 'two'], 'Xfile')
+ new Xfile
+ augroup testnewbuf
+ autocmd FileChangedShell * enew
+ augroup END
+ sleep 10m " make the test less flaky in Nvim
+ call writefile(['red'], 'Xfile')
+ call assert_fails('checktime', 'E811:')
+ au! testnewbuf
+ call delete('Xfile')
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab