diff options
author | Marco Hinz <mh.codebro+github@gmail.com> | 2018-03-16 07:29:20 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-03-16 07:29:20 +0100 |
commit | cca407b43e62d5e1abdfc59ae47b0e24eacc5807 (patch) | |
tree | 921e3768697da50d072b5bebfbe1e2dc987155b5 /test/functional | |
parent | 0093c25dd3795972b953f9914cc33fc38c5d9dbc (diff) | |
download | rneovim-cca407b43e62d5e1abdfc59ae47b0e24eacc5807.tar.gz rneovim-cca407b43e62d5e1abdfc59ae47b0e24eacc5807.tar.bz2 rneovim-cca407b43e62d5e1abdfc59ae47b0e24eacc5807.zip |
DirChanged: support <buffer> (#8140)
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/autocmd/dirchanged_spec.lua | 7 |
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) |