comparison src/testdir/test_startup.vim @ 18477:e93cab5d0f0f v8.1.2233

patch 8.1.2233: cannot get the Vim command line arguments Commit: https://github.com/vim/vim/commit/69bf634858a2a75f2984e42b1e4017bc529a040a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 29 04:16:57 2019 +0100 patch 8.1.2233: cannot get the Vim command line arguments Problem: Cannot get the Vim command line arguments. Solution: Add v:argv. (Dmitri Vereshchagin, closes https://github.com/vim/vim/issues/1322)
author Bram Moolenaar <Bram@vim.org>
date Tue, 29 Oct 2019 04:30:05 +0100
parents 85160a3649b9
children 068337e86133
comparison
equal deleted inserted replaced
18476:2eb22798b5a7 18477:e93cab5d0f0f
669 call VerifyScreenDump(buf, 'Test_start_with_tabs', {}) 669 call VerifyScreenDump(buf, 'Test_start_with_tabs', {})
670 670
671 " clean up 671 " clean up
672 call StopVimInTerminal(buf) 672 call StopVimInTerminal(buf)
673 endfunc 673 endfunc
674
675 func Test_v_argv()
676 " Can't catch the output of gvim.
677 CheckNotGui
678
679 let out = system(GetVimCommand() . ' -es -V1 -X arg1 --cmd "echo v:argv" --cmd q')
680 let list = out->split("', '")
681 call assert_match('vim', list[0])
682 let idx = index(list, 'arg1')
683 call assert_true(idx > 2)
684 call assert_equal(['arg1', '--cmd', 'echo v:argv', '--cmd', 'q'']'], list[idx:])
685 endfunc