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 | |
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')
-rw-r--r-- | test/functional/core/fileio_spec.lua | 23 | ||||
-rw-r--r-- | test/functional/legacy/autocmd_option_spec.lua | 7 |
2 files changed, 23 insertions, 7 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() diff --git a/test/functional/legacy/autocmd_option_spec.lua b/test/functional/legacy/autocmd_option_spec.lua index 8f17f509f5..2d17439a78 100644 --- a/test/functional/legacy/autocmd_option_spec.lua +++ b/test/functional/legacy/autocmd_option_spec.lua @@ -542,13 +542,6 @@ describe('au OptionSet', function() expected_combination({'cursorcolumn', 0, 0, 0, 1, 'global', 'set'}) end) - it('with option value converted internally', function() - command('noa set backspace=1') - command('set backspace=2') - expected_combination(({ - 'backspace', 'indent,eol', 'indent,eol', 'indent,eol', '2', 'global', 'set' - })) - end) end) describe('with specific option', function() |