aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd/dirchanged_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/autocmd/dirchanged_spec.lua')
-rw-r--r--test/functional/autocmd/dirchanged_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/autocmd/dirchanged_spec.lua b/test/functional/autocmd/dirchanged_spec.lua
index 63cf0bc410..7979e91a4c 100644
--- a/test/functional/autocmd/dirchanged_spec.lua
+++ b/test/functional/autocmd/dirchanged_spec.lua
@@ -154,4 +154,11 @@ describe('autocmd DirChanged', function()
eq('Failed to change directory', string.match(err, ': (.*)'))
eq({cwd=dirs[2], scope='global'}, eval('g:ev'))
end)
+
+ it('works when local to buffer', function()
+ command('let g:triggered = 0')
+ command('autocmd DirChanged <buffer> let g:triggered = 1')
+ command('cd '..dirs[1])
+ eq(1, eval('g:triggered'))
+ end)
end)