feat(options)!: remove compatible behaviours for vim 5.0 and earlier

This commit is contained in:
Lewis Russell
2023-07-17 14:27:21 +01:00
committed by GitHub
parent 98b22867c3
commit 881d17a113
11 changed files with 83 additions and 144 deletions

View File

@@ -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()