diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 09:49:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-05 09:49:52 +0800 |
| commit | 5e86cf6c13aa0a092286b42937e578c1886a3b85 (patch) | |
| tree | 5c8bd2776e3cbac280c359f863ae1d1d59ced0d0 /src/nvim/testdir/test_backup.vim | |
| parent | 19a487bc86482392eb50c61375d20e440e6e16b7 (diff) | |
| parent | b002499c1978c98cc4dfc3a3f2326997720d571a (diff) | |
| download | rneovim-5e86cf6c13aa0a092286b42937e578c1886a3b85.tar.gz rneovim-5e86cf6c13aa0a092286b42937e578c1886a3b85.tar.bz2 rneovim-5e86cf6c13aa0a092286b42937e578c1886a3b85.zip | |
Merge pull request #20938 from zeertzjq/vim-8.2.0644
vim-patch:8.2.{0433,0644,0866,0958}: various tests
Diffstat (limited to 'src/nvim/testdir/test_backup.vim')
| -rw-r--r-- | src/nvim/testdir/test_backup.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_backup.vim b/src/nvim/testdir/test_backup.vim index ce2bfe72bc..7eff818732 100644 --- a/src/nvim/testdir/test_backup.vim +++ b/src/nvim/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,19 @@ 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() + throw 'Skipped: Nvim auto-creates backup directory' + 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 |