aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2016-05-14 12:26:03 +0200
committerJurica Bradaric <jbradaric@gmail.com>2016-05-14 12:39:41 +0200
commit1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267 (patch)
tree4150bf9457d6ef1b35e6238afc6c1ed6c671b37f /test/functional/legacy
parentd02cfe80618bb85cc1cc4a19a9cfc69ae64b98af (diff)
downloadrneovim-1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267.tar.gz
rneovim-1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267.tar.bz2
rneovim-1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267.zip
vim-patch:7.4.1119
Problem: argidx() has a wrong value after ":%argdelete". (Yegappan Lakshmanan) Solution: Correct the value of w_arg_idx. Add a test. https://github.com/vim/vim/commit/72defda84eb26be9e2ade56c7877b912f818026e
Diffstat (limited to 'test/functional/legacy')
-rw-r--r--test/functional/legacy/arglist_spec.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua
new file mode 100644
index 0000000000..a569479b62
--- /dev/null
+++ b/test/functional/legacy/arglist_spec.lua
@@ -0,0 +1,31 @@
+-- Test argument list commands
+
+local helpers = require('test.functional.helpers')
+local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
+local execute, expect = helpers.execute, helpers.expect
+local eq, eval = helpers.eq, helpers.eval
+
+describe('argument list commands', function()
+ before_each(clear)
+
+ it('is working', function()
+ execute('args a b c')
+ execute('last')
+ eq(2, eval('argidx()'))
+ execute('%argdelete')
+ eq(0, eval('argidx()'))
+
+ execute('args a b c')
+ eq(0, eval('argidx()'))
+ execute('next')
+ eq(1, eval('argidx()'))
+ execute('next')
+ eq(2, eval('argidx()'))
+ execute('1argdelete')
+ eq(1, eval('argidx()'))
+ execute('1argdelete')
+ eq(0, eval('argidx()'))
+ execute('1argdelete')
+ eq(0, eval('argidx()'))
+ end)
+end)