diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/functional/autocmd/filetype_spec.lua | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/test/functional/autocmd/filetype_spec.lua b/test/functional/autocmd/filetype_spec.lua new file mode 100644 index 0000000000..e6fa7ab6bb --- /dev/null +++ b/test/functional/autocmd/filetype_spec.lua @@ -0,0 +1,16 @@ +local helpers = require('test.functional.helpers')(after_each) + +local eval = helpers.eval +local clear = helpers.clear +local command = helpers.command + +describe('autocmd FileType', function() +    before_each(clear) + +    it("is triggered by :help only once", function() +        command("let g:foo = 0") +        command("autocmd FileType help let g:foo = g:foo + 1") +        command("help help") +        assert.same(1, eval('g:foo')) +    end) +end) | 
