aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/arglist_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/arglist_spec.lua')
-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)