0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.4554: Vim9: using null values not sufficiently tested

Problem:    Vim9: using null values not sufficiently tested.
Solution:   Add more tests.  Fix uncovered problem.
This commit is contained in:
Bram Moolenaar
2022-03-12 21:28:22 +00:00
parent 8b530b3158
commit badf04f5c2
4 changed files with 139 additions and 0 deletions

View File

@@ -342,6 +342,22 @@ def Test_null_values()
endif
var d: dict<func> = {a: function('tr'), b: null_function}
var bl: list<blob> = [0z12, null_blob]
var dnl: list<dict<number>> = [{a: 1}, null_dict]
var dsl: list<dict<string>> = [{a: 'x'}, null_dict]
var lnl: list<list<number>> = [[1], null_list]
var lsl: list<list<string>> = [['x'], null_list]
def Len(v: string): number
return len(v)
enddef
var Ffl: list<func(string): number> = [Len, null_function]
var Fpl: list<func(string): number> = [Len, null_partial]
var sl: list<string> = ['x', null_string]
if has('job')
var jl: list<job> = [null_job]
var cl: list<channel> = [null_channel]
endif
END
v9.CheckDefAndScriptSuccess(lines)
enddef