aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-06-16 01:23:23 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-06-16 01:23:23 -0400
commitc83af3a88cfbd4480e02b38f1d4d8e38a58a56d5 (patch)
tree6cfc7fe6dcdf2dc225368019c4648e307b64860e /test
parent34fdb11e53496b02d3af78156efcbbee07a4352c (diff)
parent88b76ec146613797dbf3e4df76f52cd94ae1480e (diff)
downloadrneovim-c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5.tar.gz
rneovim-c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5.tar.bz2
rneovim-c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5.zip
Merge #2819 'tests: Migrate legacy test argument_0count.'.
Diffstat (limited to 'test')
-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)