diff options
author | kuuote <36663503+kuuote@users.noreply.github.com> | 2020-05-25 03:45:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 20:45:25 +0200 |
commit | e89462d9855eef7718d482df7f92da4279a1c5c3 (patch) | |
tree | 4f7b5164d071b9396a7f3a854a9fb15c251711f1 /src/nvim/testdir | |
parent | 97bcab8f5eeb8c5b2627fdfc3adad2682bb3681e (diff) | |
download | rneovim-e89462d9855eef7718d482df7f92da4279a1c5c3.tar.gz rneovim-e89462d9855eef7718d482df7f92da4279a1c5c3.tar.bz2 rneovim-e89462d9855eef7718d482df7f92da4279a1c5c3.zip |
vim-patch:8.1.2233: cannot get the Vim command line arguments (#12117)
Problem: Cannot get the Vim command line arguments.
Solution: Add v:argv. (Dmitri Vereshchagin, closes vim/vim#1322)
https://github.com/vim/vim/commit/69bf634858a2a75f2984e42b1e4017bc529a040a
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_startup.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim index f03c493275..9abaca5957 100644 --- a/src/nvim/testdir/test_startup.vim +++ b/src/nvim/testdir/test_startup.vim @@ -584,3 +584,12 @@ func Test_start_with_tabs() " clean up call StopVimInTerminal(buf) endfunc + +func Test_v_argv() + let out = system(GetVimCommand() . ' -es -V1 -X arg1 --cmd "echo v:argv" --cmd q') + let list = split(out, "', '") + call assert_match('vim', list[0]) + let idx = index(list, 'arg1') + call assert_true(idx > 2) + call assert_equal(['arg1', '--cmd', 'echo v:argv', '--cmd', 'q'']'], list[idx:]) +endfunc |