commit b44b8e7687ece66f4c535182071223d78ca54ad0
parent 089f962d6a18bd91d89998e16834b822ab2adf9f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun, 5 Mar 2023 08:34:58 +0800
test(old): make getting an unused PID work (#22529)
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/nvim/testdir/test_swap.vim b/src/nvim/testdir/test_swap.vim
@@ -435,6 +435,12 @@ func s:get_unused_pid(base)
if job_status(j) ==# 'dead'
return job_info(j).process
endif
+ elseif has('nvim')
+ let j = jobstart('echo')
+ let pid = jobpid(j)
+ if jobwait([j])[0] >= 0
+ return pid
+ endif
endif
" Must add four for MS-Windows to see it as a different one.
return a:base + 4