aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-15 20:50:04 +0800
committerGitHub <noreply@github.com>2022-08-15 20:50:04 +0800
commitcbb2e634c9da7cc6e5fe6f18539ab7deb9d67915 (patch)
tree80cc2cd976735e21ae2ca732a111fca146d6735f /test/functional
parentd33424983312806fb683eaa6bd720fe418c1299e (diff)
parent18b457ebbb46010082c8bed2d30dfa4b7c51e2de (diff)
downloadrneovim-cbb2e634c9da7cc6e5fe6f18539ab7deb9d67915.tar.gz
rneovim-cbb2e634c9da7cc6e5fe6f18539ab7deb9d67915.tar.bz2
rneovim-cbb2e634c9da7cc6e5fe6f18539ab7deb9d67915.zip
Merge pull request #19440 from zeertzjq/vim-8.2.1786
vim-patch:8.2.{1786,1799}: Normal mode commands not fully tested
Diffstat (limited to 'test/functional')
-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)