Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 22119:11dbf7e1f65c v8.2.1609
patch 8.2.1609: Vim9: test fails when build without +channel
Commit: https://github.com/vim/vim/commit/7918238528090cd019dc19613dbe76923ac9a1d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 5 20:06:33 2020 +0200
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 https://github.com/vim/vim/issues/6879)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Sep 2020 20:15:03 +0200 |
parents | 67d4be2757b0 |
children | d55008685870 |
comparison
equal
deleted
inserted
replaced
22118:9a515354454d | 22119:11dbf7e1f65c |
---|---|
1103 lines =<< trim END | 1103 lines =<< trim END |
1104 vim9script | 1104 vim9script |
1105 echo 'a' .. function('len') | 1105 echo 'a' .. function('len') |
1106 END | 1106 END |
1107 CheckScriptFailure(lines, 'E729:', 2) | 1107 CheckScriptFailure(lines, 'E729:', 2) |
1108 lines =<< trim END | 1108 enddef |
1109 vim9script | 1109 |
1110 echo 'a' .. test_null_job() | 1110 def Test_expr5_vim9script_channel() |
1111 END | 1111 if !has('channel') |
1112 CheckScriptFailure(lines, 'E908:', 2) | 1112 MissingFeature 'float' |
1113 lines =<< trim END | 1113 else |
1114 vim9script | 1114 let lines =<< trim END |
1115 echo 'a' .. test_null_channel() | 1115 vim9script |
1116 END | 1116 echo 'a' .. test_null_job() |
1117 CheckScriptFailure(lines, 'E908:', 2) | 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 | |
1118 enddef | 1125 enddef |
1119 | 1126 |
1120 def Test_expr5_float() | 1127 def Test_expr5_float() |
1121 if !has('float') | 1128 if !has('float') |
1122 MissingFeature 'float' | 1129 MissingFeature 'float' |
1170 call CheckDefFailure(["let x = 'a' .. #{a: 1}"], 'E1105', 1) | 1177 call CheckDefFailure(["let x = 'a' .. #{a: 1}"], 'E1105', 1) |
1171 call CheckDefFailure(["let x = 'a' .. test_void()"], 'E1105', 1) | 1178 call CheckDefFailure(["let x = 'a' .. test_void()"], 'E1105', 1) |
1172 call CheckDefFailure(["let x = 'a' .. 0z32"], 'E1105', 1) | 1179 call CheckDefFailure(["let x = 'a' .. 0z32"], 'E1105', 1) |
1173 call CheckDefFailure(["let x = 'a' .. function('len')"], 'E1105', 1) | 1180 call CheckDefFailure(["let x = 'a' .. function('len')"], 'E1105', 1) |
1174 call CheckDefFailure(["let x = 'a' .. function('len', ['a'])"], 'E1105', 1) | 1181 call CheckDefFailure(["let x = 'a' .. function('len', ['a'])"], 'E1105', 1) |
1182 endfunc | |
1183 | |
1184 func Test_expr5_fails_channel() | |
1185 CheckFeature channel | |
1175 call CheckDefFailure(["let x = 'a' .. test_null_job()"], 'E1105', 1) | 1186 call CheckDefFailure(["let x = 'a' .. test_null_job()"], 'E1105', 1) |
1176 call CheckDefFailure(["let x = 'a' .. test_null_channel()"], 'E1105', 1) | 1187 call CheckDefFailure(["let x = 'a' .. test_null_channel()"], 'E1105', 1) |
1177 endfunc | 1188 endfunc |
1178 | 1189 |
1179 " test multiply, divide, modulo | 1190 " test multiply, divide, modulo |