]> granicus.if.org Git - vim/commitdiff
patch 8.2.0501: Vim9: script test fails when channel feature is missing v8.2.0501
authorBram Moolenaar <Bram@vim.org>
Thu, 2 Apr 2020 17:12:08 +0000 (19:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 2 Apr 2020 17:12:08 +0000 (19:12 +0200)
Problem:    Vim9: script test fails when channel feature is missing.
Solution:   Add a has() condition.

src/testdir/test_vim9_script.vim
src/version.c

index c5405a2dc4c480d84d844edac74e94d01685cd7a..8d36c81ad7054957fb5f892207dfb086b8e0504f 100644 (file)
@@ -164,11 +164,13 @@ def Test_assignment()
   let thedict: dict<any>
   assert_equal({}, thedict)
 
-  let thejob: job
-  assert_equal(test_null_job(), thejob)
+  if has('channel')
+    let thejob: job
+    assert_equal(test_null_job(), thejob)
 
-  let thechannel: channel
-  assert_equal(test_null_channel(), thechannel)
+    let thechannel: channel
+    assert_equal(test_null_channel(), thechannel)
+  endif
 enddef
 
 func Test_assignment_failure()
index bb11730bec49357661c34532005e8d062126c1b7..b1a10aaebd25635ec6dfe0c79823771fcb3a3f40 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    501,
 /**/
     500,
 /**/