aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/argument_0count_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/argument_0count_spec.lua')
-rw-r--r--test/functional/legacy/argument_0count_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/legacy/argument_0count_spec.lua b/test/functional/legacy/argument_0count_spec.lua
new file mode 100644
index 0000000000..6e8b60547b
--- /dev/null
+++ b/test/functional/legacy/argument_0count_spec.lua
@@ -0,0 +1,28 @@
+-- Tests for :0argadd and :0argedit
+
+local helpers = require('test.functional.helpers')
+local eq, eval, clear, execute =
+ helpers.eq, helpers.eval, helpers.clear, helpers.execute
+
+describe('argument_0count', function()
+ setup(clear)
+
+ it('is working', function()
+ execute('arga a b c d')
+ eq({'a', 'b', 'c', 'd'}, eval('argv()'))
+ execute('2argu')
+ execute('0arga added')
+ eq({'added', 'a', 'b', 'c', 'd'}, eval('argv()'))
+ execute('2argu')
+ execute('arga third')
+ eq({'added', 'a', 'third', 'b', 'c', 'd'}, eval('argv()'))
+ execute('%argd')
+ execute('arga a b c d')
+ execute('2argu')
+ execute('0arge edited')
+ eq({'edited', 'a', 'b', 'c', 'd'}, eval('argv()'))
+ execute('2argu')
+ execute('arga third')
+ eq({'edited', 'a', 'third', 'b', 'c', 'd'}, eval('argv()'))
+ end)
+end)