diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-17 14:27:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 14:27:21 +0100 |
commit | 881d17a11393da75a27c072faa3fd45f510175fe (patch) | |
tree | b1bc798c4a36de45f3ee0058ffdd86782638214d /test/functional/core/fileio_spec.lua | |
parent | 98b22867c33a45aaaf057afbeda8acb0216494e3 (diff) | |
download | rneovim-881d17a11393da75a27c072faa3fd45f510175fe.tar.gz rneovim-881d17a11393da75a27c072faa3fd45f510175fe.tar.bz2 rneovim-881d17a11393da75a27c072faa3fd45f510175fe.zip |
feat(options)!: remove compatible behaviours for vim 5.0 and earlier
Diffstat (limited to 'test/functional/core/fileio_spec.lua')
-rw-r--r-- | test/functional/core/fileio_spec.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index d1236f2766..8de78234ce 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -45,6 +45,7 @@ describe('fileio', function() os.remove('Xtest-overwrite-forced') rmdir('Xtest_startup_swapdir') rmdir('Xtest_backupdir') + rmdir('Xtest_backupdir with spaces') end) it('fsync() codepaths #8304', function() @@ -132,6 +133,28 @@ describe('fileio', function() eq('foo', foo_contents); end) + it('backup with full path with spaces', function() + skip(is_ci('cirrus')) + clear() + mkdir('Xtest_backup with spaces') + command('set backup') + command('set backupdir=Xtest_backupdir\\ with\\ spaces//') + command('write Xtest_startup_file1') + feed('ifoo<esc>') + command('write') + feed('Abar<esc>') + command('write') + + -- Backup filename = fullpath, separators replaced with "%". + local backup_file_name = string.gsub(currentdir()..'/Xtest_startup_file1', + is_os('win') and '[:/\\]' or '/', '%%') .. '~' + local foo_contents = trim(read_file('Xtest_backupdir with spaces/'..backup_file_name)) + local foobar_contents = trim(read_file('Xtest_startup_file1')) + + eq('foobar', foobar_contents); + eq('foo', foo_contents); + end) + it('backup symlinked files #11349', function() skip(is_ci('cirrus')) clear() |