summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-05 20:06:33 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-05 20:06:33 +0200
commit7918238528090cd019dc19613dbe76923ac9a1d7 (patch)
tree919fcf0e096ee22843dd1adb3a2454d7fe749dde
parent15183b41c4416b7638cce26de0a9a83e55948bdc (diff)
patch 8.2.1609: Vim9: test fails when build without +channelv8.2.1609
Problem: Vim9: test fails when build without +channel. Solution: Add check for +channel. (closes #6879)
-rw-r--r--src/testdir/test_vim9_expr.vim31
-rw-r--r--src/version.c2
2 files changed, 23 insertions, 10 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index a7d8d87f3c..711d5bad21 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index e1cdba6d6c..9216408c01 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1609,
+/**/
1608,
/**/
1607,