]> granicus.if.org Git - vim/commitdiff
patch 8.2.2479: set/getbufline test fails without the job feature v8.2.2479
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2021 13:31:06 +0000 (14:31 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2021 13:31:06 +0000 (14:31 +0100)
Problem:    set/getbufline test fails without the job feature.
Solution:   Check whether the job feature is supported. (Dominique PellĂ©,
            closes #7790)

src/testdir/test_bufline.vim
src/testdir/test_vim9_builtin.vim
src/version.c

index b2de198ef0eab51936af346ee293edbcb718631f..5df528818400bba9f6b60ff5dee8830283cbc975 100644 (file)
@@ -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
 
index 06839c0c5145d86bc917aa02d2f37f8cc72c99b9..eb36bd77a159bb144be9b0074d82e567757ab818 100644 (file)
@@ -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
index ae61a32c86f9d235549538c562e3dcf1981846ae..383e15a1875dfccb2d68a5287b997552b9e0cf49 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2479,
 /**/
     2478,
 /**/