Skip to content

Commit 0038511

Browse files
committed
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)
1 parent 0dc5f60 commit 0038511

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

src/testdir/test_bufline.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ func Test_setbufline_getbufline()
4040
call assert_equal([], getbufline(b, 6))
4141
call assert_equal([], getbufline(b, 2, 1))
4242

43-
call setbufline(b, 2, [function('eval'), #{key: 123}, test_null_job()])
44-
call assert_equal(["function('eval')",
45-
\ "{'key': 123}",
46-
\ "no process"],
47-
\ getbufline(b, 2, 4))
43+
if has('job')
44+
call setbufline(b, 2, [function('eval'), #{key: 123}, test_null_job()])
45+
call assert_equal(["function('eval')",
46+
\ "{'key': 123}",
47+
\ "no process"],
48+
\ getbufline(b, 2, 4))
49+
endif
4850
exe "bwipe! " . b
4951
endfunc
5052

src/testdir/test_vim9_builtin.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -824,11 +824,13 @@ def Test_set_get_bufline()
824824
assert_equal([], getbufline(b, 6))
825825
assert_equal([], getbufline(b, 2, 1))
826826

827-
setbufline(b, 2, [function('eval'), {key: 123}, test_null_job()])
828-
assert_equal(["function('eval')",
829-
"{'key': 123}",
830-
"no process"],
831-
getbufline(b, 2, 4))
827+
if has('job')
828+
setbufline(b, 2, [function('eval'), {key: 123}, test_null_job()])
829+
assert_equal(["function('eval')",
830+
"{'key': 123}",
831+
"no process"],
832+
getbufline(b, 2, 4))
833+
endif
832834

833835
exe 'bwipe! ' .. b
834836
END

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2479,
753755
/**/
754756
2478,
755757
/**/

0 commit comments

Comments
 (0)