diff options
author | lonerover <pathfinder1644@yahoo.com> | 2017-03-29 07:30:54 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-29 01:30:54 +0200 |
commit | e86042ae178736d657b5da12adce4479633aa8d5 (patch) | |
tree | cddafc4fcf976e4352b43e2a4dc3632f98986963 /test | |
parent | b9e7ab1484784903b3233309a402138dc42e7e59 (diff) | |
download | rneovim-e86042ae178736d657b5da12adce4479633aa8d5.tar.gz rneovim-e86042ae178736d657b5da12adce4479633aa8d5.tar.bz2 rneovim-e86042ae178736d657b5da12adce4479633aa8d5.zip |
vim-patch:7.4.2343 and mark NA patches (#6384)
vim-patch:7.4.2343
Problem: Too many old file tests.
Solution: Turn several into new style tests. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/arglist_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index f5e3522972..b9075620dc 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -269,4 +269,33 @@ describe('argument list commands', function() eq(0, eval('argidx()')) execute('%argd') end) + + + it('test for autocommand that redefines the argument list, when doing ":all"', function() + execute('autocmd BufReadPost Xxx2 next Xxx2 Xxx1') + execute("call writefile(['test file Xxx1'], 'Xxx1')") + execute("call writefile(['test file Xxx2'], 'Xxx2')") + execute("call writefile(['test file Xxx3'], 'Xxx3')") + + execute('new') + -- redefine arglist; go to Xxx1 + execute('next! Xxx1 Xxx2 Xxx3') + -- open window for all args + execute('all') + eq('test file Xxx1', eval('getline(1)')) + execute('wincmd w') + execute('wincmd w') + eq('test file Xxx1', eval('getline(1)')) + -- should now be in Xxx2 + execute('rewind') + eq('test file Xxx2', eval('getline(1)')) + + execute('autocmd! BufReadPost Xxx2') + execute('enew! | only') + execute("call delete('Xxx1')") + execute("call delete('Xxx2')") + execute("call delete('Xxx3')") + execute('argdelete Xxx*') + execute('bwipe! Xxx1 Xxx2 Xxx3') + end) end) |