]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.3845: Vim9: test fails when the channel feature is missing v8.2.3845
authorDominique Pelle <dominique.pelle@gmail.com>
Sat, 18 Dec 2021 12:40:52 +0000 (12:40 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 18 Dec 2021 12:40:52 +0000 (12:40 +0000)
Problem:    Vim9: test fails when the channel feature is missing.
Solution:   Check for the channel feature. (Dominique PellĂ©, closes #9368)

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

index c9255575efac5a01f7e288fae184ea7818b899e5..aa5af0d8931f7e97e94e2022fda4f89a2dd1520a 100644 (file)
@@ -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
 
index dbf2fe5ac67760f88b809bdeed1f597a9fe3ecdc..262a330c66ddee8029f86dd3a85ad4ad8ee04a5d 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3845,
 /**/
     3844,
 /**/