aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/buffer_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
commitff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch)
tree729bbcb92231538fa61dab6c3d890b025484b7f5 /test/functional/legacy/buffer_spec.lua
parent376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff)
parent28c04948a1c887a1cc0cb64de79fa32631700466 (diff)
downloadrneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/legacy/buffer_spec.lua')
-rw-r--r--test/functional/legacy/buffer_spec.lua59
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)