Skip to content

Commit 7918238

Browse files
committed
patch 8.2.1609: Vim9: test fails when build without +channel
Problem: Vim9: test fails when build without +channel. Solution: Add check for +channel. (closes #6879)
1 parent 15183b4 commit 7918238

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

src/testdir/test_vim9_expr.vim

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,16 +1105,23 @@ def Test_expr5_vim9script()
11051105
echo 'a' .. function('len')
11061106
END
11071107
CheckScriptFailure(lines, 'E729:', 2)
1108-
lines =<< trim END
1109-
vim9script
1110-
echo 'a' .. test_null_job()
1111-
END
1112-
CheckScriptFailure(lines, 'E908:', 2)
1113-
lines =<< trim END
1114-
vim9script
1115-
echo 'a' .. test_null_channel()
1116-
END
1117-
CheckScriptFailure(lines, 'E908:', 2)
1108+
enddef
1109+
1110+
def Test_expr5_vim9script_channel()
1111+
if !has('channel')
1112+
MissingFeature 'float'
1113+
else
1114+
let lines =<< trim END
1115+
vim9script
1116+
echo 'a' .. test_null_job()
1117+
END
1118+
CheckScriptFailure(lines, 'E908:', 2)
1119+
lines =<< trim END
1120+
vim9script
1121+
echo 'a' .. test_null_channel()
1122+
END
1123+
CheckScriptFailure(lines, 'E908:', 2)
1124+
endif
11181125
enddef
11191126

11201127
def Test_expr5_float()
@@ -1172,6 +1179,10 @@ func Test_expr5_fails()
11721179
call CheckDefFailure(["let x = 'a' .. 0z32"], 'E1105', 1)
11731180
call CheckDefFailure(["let x = 'a' .. function('len')"], 'E1105', 1)
11741181
call CheckDefFailure(["let x = 'a' .. function('len', ['a'])"], 'E1105', 1)
1182+
endfunc
1183+
1184+
func Test_expr5_fails_channel()
1185+
CheckFeature channel
11751186
call CheckDefFailure(["let x = 'a' .. test_null_job()"], 'E1105', 1)
11761187
call CheckDefFailure(["let x = 'a' .. test_null_channel()"], 'E1105', 1)
11771188
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1609,
757759
/**/
758760
1608,
759761
/**/

0 commit comments

Comments
 (0)