diff src/testdir/test_gf.vim @ 22502:1503ecd54f8a v8.2.1799

patch 8.2.1799: some Normal mode commands not fully tested Commit: https://github.com/vim/vim/commit/d1ad99b65470d3e754f6a0588a6b0dc2214a1eab Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 4 16:16:54 2020 +0200 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 https://github.com/vim/vim/issues/7073)
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Oct 2020 16:30:03 +0200
parents d37e4a856246
children c2c40cefc17b
line wrap: on
line diff
--- a/src/testdir/test_gf.vim
+++ b/src/testdir/test_gf.vim
@@ -183,6 +183,21 @@ func Test_gf_error()
   au! InsertCharPre
 
   bwipe!
+
+  " gf is not allowed when buffer is locked
+  new
+  augroup Test_gf
+    au!
+    au OptionSet diff norm! gf
+  augroup END
+  call setline(1, ['Xfile1', 'line2', 'line3', 'line4'])
+  call test_override('starting', 1)
+  call assert_fails('diffthis', 'E788:')
+  call test_override('starting', 0)
+  augroup Test_gf
+    au!
+  augroup END
+  bw!
 endfunc
 
 " If a file is not found by 'gf', then 'includeexpr' should be used to locate