]> granicus.if.org Git - vim/commitdiff
patch 8.2.1609: Vim9: test fails when build without +channel v8.2.1609
authorBram Moolenaar <Bram@vim.org>
Sat, 5 Sep 2020 18:06:33 +0000 (20:06 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 5 Sep 2020 18:06:33 +0000 (20:06 +0200)
Problem:    Vim9: test fails when build without +channel.
Solution:   Add check for +channel. (closes #6879)

src/testdir/test_vim9_expr.vim
src/version.c

index a7d8d87f3cd26b88e8e2bf0f48849b175edd84c9..711d5bad21297f1eeee11595f54a01c9ca0e5978 100644 (file)
@@ -1105,16 +1105,23 @@ def Test_expr5_vim9script()
       echo 'a' .. function('len')
   END
   CheckScriptFailure(lines, 'E729:', 2)
-  lines =<< trim END
-      vim9script
-      echo 'a' .. test_null_job()
-  END
-  CheckScriptFailure(lines, 'E908:', 2)
-  lines =<< trim END
-      vim9script
-      echo 'a' .. test_null_channel()
-  END
-  CheckScriptFailure(lines, 'E908:', 2)
+enddef
+
+def Test_expr5_vim9script_channel()
+  if !has('channel')
+    MissingFeature 'float'
+  else
+    let lines =<< trim END
+        vim9script
+        echo 'a' .. test_null_job()
+    END
+    CheckScriptFailure(lines, 'E908:', 2)
+    lines =<< trim END
+        vim9script
+        echo 'a' .. test_null_channel()
+    END
+    CheckScriptFailure(lines, 'E908:', 2)
+  endif
 enddef
 
 def Test_expr5_float()
@@ -1172,6 +1179,10 @@ func Test_expr5_fails()
   call CheckDefFailure(["let x = 'a' .. 0z32"], 'E1105', 1)
   call CheckDefFailure(["let x = 'a' .. function('len')"], 'E1105', 1)
   call CheckDefFailure(["let x = 'a' .. function('len', ['a'])"], 'E1105', 1)
+endfunc
+
+func Test_expr5_fails_channel()
+  CheckFeature channel
   call CheckDefFailure(["let x = 'a' .. test_null_job()"], 'E1105', 1)
   call CheckDefFailure(["let x = 'a' .. test_null_channel()"], 'E1105', 1)
 endfunc
index e1cdba6d6c99d4c46527c38664d78e832972118f..9216408c0147e699b9d9c1ae042533b5e8c0a22a 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1609,
 /**/
     1608,
 /**/