diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-05 18:04:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 18:04:45 +0800 |
commit | a500c5f808ccf0b678c935f00e0af4503a5bd724 (patch) | |
tree | faec5c534b49cccfabb239748499d530ea5bc054 /test/functional/legacy/buffer_spec.lua | |
parent | 4add77ddbfbbff0795ee9bcca42b8096a6265049 (diff) | |
download | rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.tar.gz rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.tar.bz2 rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.zip |
vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184)
Problem: Dialog for file changed outside of Vim not tested.
Solution: Add a test. Move FileChangedShell test. Add 'L' flag to
feedkeys().
https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/legacy/buffer_spec.lua')
-rw-r--r-- | test/functional/legacy/buffer_spec.lua | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/test/functional/legacy/buffer_spec.lua b/test/functional/legacy/buffer_spec.lua deleted file mode 100644 index b3964540f0..0000000000 --- a/test/functional/legacy/buffer_spec.lua +++ /dev/null @@ -1,59 +0,0 @@ -local helpers = require('test.functional.helpers')(after_each) -local clear, source = helpers.clear, helpers.source -local call, eq, api = helpers.call, helpers.eq, helpers.api - -local function expected_empty() - eq({}, api.nvim_get_vvar('errors')) -end - -describe('buffer', function() - before_each(function() - clear() - api.nvim_ui_attach(80, 24, {}) - api.nvim_set_option_value('hidden', false, {}) - end) - - it('deleting a modified buffer with :confirm', function() - source([[ - func Test_bdel_with_confirm() - new - call setline(1, 'test') - call assert_fails('bdel', 'E89:') - call nvim_input('c') - confirm bdel - call assert_equal(2, winnr('$')) - call assert_equal(1, &modified) - call nvim_input('n') - confirm bdel - call assert_equal(1, winnr('$')) - endfunc - ]]) - call('Test_bdel_with_confirm') - expected_empty() - end) - - it('editing another buffer from a modified buffer with :confirm', function() - source([[ - func Test_goto_buf_with_confirm() - new Xfile - enew - call setline(1, 'test') - call assert_fails('b Xfile', 'E37:') - call nvim_input('c') - call assert_fails('confirm b Xfile', 'E37:') - call assert_equal(1, &modified) - call assert_equal('', @%) - call nvim_input('y') - call assert_fails('confirm b Xfile', 'E37:') - call assert_equal(1, &modified) - call assert_equal('', @%) - call nvim_input('n') - confirm b Xfile - call assert_equal('Xfile', @%) - close! - endfunc - ]]) - call('Test_goto_buf_with_confirm') - expected_empty() - end) -end) |