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 /test/functional/core | |
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 'test/functional/core')
-rw-r--r-- | test/functional/core/startup_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 96822803bf..3269fbc68d 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -295,6 +295,14 @@ describe('startup', function() }) ) end) + + it("get command line arguments from v:argv", function() + local out = funcs.system({ nvim_prog, '-u', 'NONE', '-i', 'NONE', '--headless', + '--cmd', nvim_set, + '-c', [[echo v:argv[-1:] len(v:argv) > 1]], + '+q' }) + eq('[\'+q\'] 1', out) + end) end) describe('sysinit', function() |