aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_filechanged.vim
diff options
context:
space:
mode:
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