diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-11 19:22:43 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-11 19:22:43 +0200 |
commit | 1de5f7c81d5e78fb4d612134bd2dfa6ee9183fae (patch) | |
tree | 11092c1d0da722d3e05b49c6b88eda0afe6620e3 /src/testdir/test_backup.vim | |
parent | 2d4070d3b02e775a6f3d5ef52265add270e09a4f (diff) |
patch 8.2.0958: not sufficient testing for buffer writingv8.2.0958
Problem: Not sufficient testing for buffer writing.
Solution: Add a few tests. (Yegappan Lakshmanan, closes #6238)
Diffstat (limited to 'src/testdir/test_backup.vim')
-rw-r--r-- | src/testdir/test_backup.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_backup.vim b/src/testdir/test_backup.vim index ce2bfe72bc..0d3e79c22a 100644 --- a/src/testdir/test_backup.vim +++ b/src/testdir/test_backup.vim @@ -1,5 +1,7 @@ " Tests for the backup function +source check.vim + func Test_backup() set backup backupdir=. backupskip= new @@ -56,3 +58,18 @@ func Test_backup2_backupcopy() call delete(f) set backup&vim backupdir&vim backupcopy&vim backupskip&vim endfunc + +" Test for using a non-existing directory as a backup directory +func Test_non_existing_backupdir() + CheckNotBSD + let save_backup = &backupdir + set backupdir=./non_existing_dir + call writefile(['line1'], 'Xfile') + new Xfile + " TODO: write doesn't fail in Cirrus FreeBSD CI test + call assert_fails('write', 'E510:') + let &backupdir = save_backup + call delete('Xfile') +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |