aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-20 08:16:02 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-15 20:24:43 +0800
commit76b4b1977ba3f3a1f630468a2ce89f47f2cedec4 (patch)
tree7d899e1d86a5e939c231ee18e66f4cea9bd7aa5a /test
parent37586eac42b285b97e6b85e736750c4f15df068d (diff)
downloadrneovim-76b4b1977ba3f3a1f630468a2ce89f47f2cedec4.tar.gz
rneovim-76b4b1977ba3f3a1f630468a2ce89f47f2cedec4.tar.bz2
rneovim-76b4b1977ba3f3a1f630468a2ce89f47f2cedec4.zip
vim-patch:8.2.1799: some Normal mode commands not fully tested
Problem: Some Normal mode commands not fully tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#7073) https://github.com/vim/vim/commit/d1ad99b65470d3e754f6a0588a6b0dc2214a1eab Cherry-pick test_registers.vim change from patch 8.2.0644.
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/gf_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/legacy/gf_spec.lua b/test/functional/legacy/gf_spec.lua
new file mode 100644
index 0000000000..f1b1790ba1
--- /dev/null
+++ b/test/functional/legacy/gf_spec.lua
@@ -0,0 +1,15 @@
+local helpers = require('test.functional.helpers')(after_each)
+local clear = helpers.clear
+local command = helpers.command
+local eq = helpers.eq
+local pcall_err = helpers.pcall_err
+
+describe('gf', function()
+ before_each(clear)
+
+ it('is not allowed when buffer is locked', function()
+ command('au OptionSet diff norm! gf')
+ command([[call setline(1, ['Xfile1', 'line2', 'line3', 'line4'])]])
+ eq('Vim(normal):E788: Not allowed to edit another buffer now', pcall_err(command, 'diffthis'))
+ end)
+end)