neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

filetype_spec.lua (418B)


      1 local n = require('test.functional.testnvim')()
      2 
      3 local eval = n.eval
      4 local clear = n.clear
      5 local command = n.command
      6 
      7 describe('autocmd FileType', function()
      8  before_each(clear)
      9 
     10  it('is triggered by :help only once', function()
     11    n.add_builddir_to_rtp()
     12    command('let g:foo = 0')
     13    command('autocmd FileType help let g:foo = g:foo + 1')
     14    command('help help')
     15    assert.same(1, eval('g:foo'))
     16  end)
     17 end)