Mercurial > vim
changeset 23875:54b583156d53 v8.2.2479
patch 8.2.2479: set/getbufline test fails without the job feature
Commit: https://github.com/vim/vim/commit/00385114dbd6a3d59516baa02e1ea86a1e7ee70e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 7 14:31:06 2021 +0100
patch 8.2.2479: set/getbufline test fails without the job feature
Problem: set/getbufline test fails without the job feature.
Solution: Check whether the job feature is supported. (Dominique Pell?,
closes #7790)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Feb 2021 14:45:04 +0100 |
parents | 4aff5ea80b69 |
children | 50f3627e6740 |
files | src/testdir/test_bufline.vim src/testdir/test_vim9_builtin.vim src/version.c |
diffstat | 3 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -40,11 +40,13 @@ func Test_setbufline_getbufline() call assert_equal([], getbufline(b, 6)) call assert_equal([], getbufline(b, 2, 1)) - call setbufline(b, 2, [function('eval'), #{key: 123}, test_null_job()]) - call assert_equal(["function('eval')", - \ "{'key': 123}", - \ "no process"], - \ getbufline(b, 2, 4)) + if has('job') + call setbufline(b, 2, [function('eval'), #{key: 123}, test_null_job()]) + call assert_equal(["function('eval')", + \ "{'key': 123}", + \ "no process"], + \ getbufline(b, 2, 4)) + endif exe "bwipe! " . b endfunc
--- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -824,11 +824,13 @@ def Test_set_get_bufline() assert_equal([], getbufline(b, 6)) assert_equal([], getbufline(b, 2, 1)) - setbufline(b, 2, [function('eval'), {key: 123}, test_null_job()]) - assert_equal(["function('eval')", - "{'key': 123}", - "no process"], - getbufline(b, 2, 4)) + if has('job') + setbufline(b, 2, [function('eval'), {key: 123}, test_null_job()]) + assert_equal(["function('eval')", + "{'key': 123}", + "no process"], + getbufline(b, 2, 4)) + endif exe 'bwipe! ' .. b END