From e9134421ab8f72393d469d9d7793d4a75984cb93 Mon Sep 17 00:00:00 2001 From: Nimit Bhardwaj Date: Wed, 14 Feb 2018 19:48:01 +0530 Subject: vim-patch-8.0.0649 and vim-patch-8.0.0650: autocmd open help 2 times --- test/functional/autocmd/filetype_spec.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/functional/autocmd/filetype_spec.lua (limited to 'test/functional') 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) -- cgit