changeset 26632:501b1a24d032 v8.2.3845

patch 8.2.3845: Vim9: test fails when the channel feature is missing Commit: https://github.com/vim/vim/commit/0dc4d8eaecc3acc26c3bee906d98097f9faa90bd Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Sat Dec 18 12:40:52 2021 +0000 patch 8.2.3845: Vim9: test fails when the channel feature is missing Problem: Vim9: test fails when the channel feature is missing. Solution: Check for the channel feature. (Dominique Pell?, closes https://github.com/vim/vim/issues/9368)
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 Dec 2021 13:45:05 +0100
parents b044e0a903b9
children d324ddf09172
files src/testdir/test_vim9_builtin.vim src/version.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -2027,7 +2027,9 @@ def Test_luaeval()
 enddef
 
 def Test_map()
-  CheckDefAndScriptFailure2(['map(test_null_channel(), "1")'], 'E1013: Argument 1: type mismatch, expected list<any> but got channel', 'E1228: List, Dictionary, Blob or String required for argument 1')
+  if has('channel')
+    CheckDefAndScriptFailure2(['map(test_null_channel(), "1")'], 'E1013: Argument 1: type mismatch, expected list<any> but got channel', 'E1228: List, Dictionary, Blob or String required for argument 1')
+  endif
   CheckDefAndScriptFailure2(['map(1, "1")'], 'E1013: Argument 1: type mismatch, expected list<any> but got number', 'E1228: List, Dictionary, Blob or String required for argument 1')
 enddef
 
@@ -2144,7 +2146,9 @@ def Test_mapcheck()
 enddef
 
 def Test_mapnew()
-  CheckDefAndScriptFailure2(['mapnew(test_null_job(), "1")'], 'E1013: Argument 1: type mismatch, expected list<any> but got job', 'E1228: List, Dictionary, Blob or String required for argument 1')
+  if has('channel')
+    CheckDefAndScriptFailure2(['mapnew(test_null_job(), "1")'], 'E1013: Argument 1: type mismatch, expected list<any> but got job', 'E1228: List, Dictionary, Blob or String required for argument 1')
+  endif
   CheckDefAndScriptFailure2(['mapnew(1, "1")'], 'E1013: Argument 1: type mismatch, expected list<any> but got number', 'E1228: List, Dictionary, Blob or String required for argument 1')
 enddef
 
--- a/src/version.c
+++ b/src/version.c
@@ -750,6 +750,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3845,
+/**/
     3844,
 /**/
     3843,