diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-08 08:00:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 08:00:27 +0800 |
commit | 3bb5d2f2192b63e368a4f573f66406eba3ee66b3 (patch) | |
tree | 05ce75681734aae42887dcf1b02c802dab08c731 /test/functional/api/vim_spec.lua | |
parent | 5e3c1b976ab4664bde2f546ac15510f4d888a39e (diff) | |
download | rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.tar.gz rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.tar.bz2 rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.zip |
test: use termopen() instead of :terminal more (#26462)
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index abae346701..7a3116cba5 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -2396,7 +2396,11 @@ describe('API', function() eq(info, meths.get_chan_info(3)) -- :terminal with args + running process. - command(':exe "terminal" shellescape(v:progpath) "-u NONE -i NONE"') + command('enew') + local progpath_esc = eval('shellescape(v:progpath)') + funcs.termopen(('%s -u NONE -i NONE'):format(progpath_esc), { + env = { VIMRUNTIME = os.getenv('VIMRUNTIME') } + }) eq(-1, eval('jobwait([&channel], 0)[0]')) -- Running? local expected2 = { stream = 'job', @@ -2406,11 +2410,11 @@ describe('API', function() eval('&shell'), '/s', '/c', - fmt('"%s -u NONE -i NONE"', eval('shellescape(v:progpath)')), + fmt('"%s -u NONE -i NONE"', progpath_esc), } or { eval('&shell'), eval('&shellcmdflag'), - fmt('%s -u NONE -i NONE', eval('shellescape(v:progpath)')), + fmt('%s -u NONE -i NONE', progpath_esc), } ), mode = 'terminal', |