diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-06-16 01:23:23 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-06-16 01:23:23 -0400 |
commit | c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5 (patch) | |
tree | 6cfc7fe6dcdf2dc225368019c4648e307b64860e | |
parent | 34fdb11e53496b02d3af78156efcbbee07a4352c (diff) | |
parent | 88b76ec146613797dbf3e4df76f52cd94ae1480e (diff) | |
download | rneovim-c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5.tar.gz rneovim-c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5.tar.bz2 rneovim-c83af3a88cfbd4480e02b38f1d4d8e38a58a56d5.zip |
Merge #2819 'tests: Migrate legacy test argument_0count.'.
-rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_argument_0count.in | 28 | ||||
-rw-r--r-- | src/nvim/testdir/test_argument_0count.ok | 5 | ||||
-rw-r--r-- | test/functional/legacy/argument_0count_spec.lua | 28 |
4 files changed, 28 insertions, 34 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 0359e15488..023a8bf234 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -30,7 +30,6 @@ SCRIPTS := test_eval.out \ test_argument_count.out \ test_close_count.out \ test_command_count.out \ - test_argument_0count.out SCRIPTS_GUI := test16.out diff --git a/src/nvim/testdir/test_argument_0count.in b/src/nvim/testdir/test_argument_0count.in deleted file mode 100644 index 88317fa1fc..0000000000 --- a/src/nvim/testdir/test_argument_0count.in +++ /dev/null @@ -1,28 +0,0 @@ -Tests for :0argadd and :0argedit vim: set ft=vim : - -STARTTEST -:so small.vim -:let arglists = [] -:%argd -:arga a b c d -:2argu -:0arga added -:call add(arglists, argv()) -:2argu -:arga third -:call add(arglists, argv()) -:%argd -:arga a b c d -:2argu -:0arge edited -:call add(arglists, argv()) -:2argu -:arga third -:call add(arglists, argv()) -:e! test.out -:call append(0, map(copy(arglists), 'join(v:val, " ")')) -:w -:qa! -ENDTEST - - diff --git a/src/nvim/testdir/test_argument_0count.ok b/src/nvim/testdir/test_argument_0count.ok deleted file mode 100644 index ee5daea812..0000000000 --- a/src/nvim/testdir/test_argument_0count.ok +++ /dev/null @@ -1,5 +0,0 @@ -added a b c d -added a third b c d -edited a b c d -edited a third b c d - 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) |