diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-05 08:34:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 08:34:58 +0800 |
commit | b44b8e7687ece66f4c535182071223d78ca54ad0 (patch) | |
tree | 8a7ac658bdceb9a27d818efbfbb0dc338d1f914d | |
parent | 089f962d6a18bd91d89998e16834b822ab2adf9f (diff) | |
download | rneovim-b44b8e7687ece66f4c535182071223d78ca54ad0.tar.gz rneovim-b44b8e7687ece66f4c535182071223d78ca54ad0.tar.bz2 rneovim-b44b8e7687ece66f4c535182071223d78ca54ad0.zip |
test(old): make getting an unused PID work (#22529)
-rw-r--r-- | src/nvim/testdir/test_swap.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_swap.vim b/src/nvim/testdir/test_swap.vim index ceadc1d85a..4241f4fd69 100644 --- 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 |