diff options
-rw-r--r-- | test/functional/autocmd/dirchanged_spec.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/functional/autocmd/dirchanged_spec.lua b/test/functional/autocmd/dirchanged_spec.lua index bbbc98e5a2..f4a1642ebf 100644 --- a/test/functional/autocmd/dirchanged_spec.lua +++ b/test/functional/autocmd/dirchanged_spec.lua @@ -104,16 +104,19 @@ describe('autocmd DirChanged', function() command('split '..dirs[1]..'/foo') eq({cwd=dirs[1], scope='window', changed_window=false}, eval('g:ev')) + eq('auto', eval('g:amatch')) command('split '..dirs[2]..'/bar') eq({cwd=dirs[2], scope='window', changed_window=false}, eval('g:ev')) + eq('auto', eval('g:amatch')) eq(2, eval('g:cdcount')) end) - it('does not trigger if diretory has not changed', function() + it('does not trigger if directory has not changed', function() command('lcd '..dirs[1]) eq({cwd=dirs[1], scope='window', changed_window=false}, eval('g:ev')) + eq('window', eval('g:amatch')) eq(1, eval('g:cdcount')) command('let g:ev = {}') command('lcd '..dirs[1]) @@ -143,6 +146,7 @@ describe('autocmd DirChanged', function() command('cd '..dirs[3]) eq({cwd=dirs[3], scope='global', changed_window=false}, eval('g:ev')) + eq('global', eval('g:amatch')) eq(3, eval('g:cdcount')) command('let g:ev = {}') command('cd '..dirs[3]) @@ -159,6 +163,7 @@ describe('autocmd DirChanged', function() command('split '..dirs[1]..'/foo') eq({cwd=dirs[1], scope='window', changed_window=false}, eval('g:ev')) + eq('auto', eval('g:amatch')) eq(4, eval('g:cdcount')) command('let g:ev = {}') command('split '..dirs[1]..'/bar') @@ -181,6 +186,7 @@ describe('autocmd DirChanged', function() command('2wincmd w') -- window 2 eq({cwd=dirs[2], scope='window', changed_window=true}, eval('g:ev')) + eq('window', eval('g:amatch')) eq(4, eval('g:cdcount')) command('tabnew') -- tab 2 (tab-local CWD) |