aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_excmd.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_excmd.vim')
-rw-r--r--src/nvim/testdir/test_excmd.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim
index f844999d8d..dac7a6989d 100644
--- a/src/nvim/testdir/test_excmd.vim
+++ b/src/nvim/testdir/test_excmd.vim
@@ -696,5 +696,21 @@ func Test_using_zero_in_range()
bwipe!
endfunc
+" Test :write after changing name with :file and loading it with :edit
+func Test_write_after_rename()
+ call writefile(['text'], 'Xfile')
+
+ enew
+ file Xfile
+ call assert_fails('write', 'E13: File exists (add ! to override)')
+
+ " works OK after ":edit"
+ edit
+ write
+
+ call delete('Xfile')
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab