aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/gf_spec.lua
blob: f1b1790ba1c3bc1df0bac38cc2174c7f0287bbcb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)