Lines Matching refs:list

395 …re2(["var x = [] || false"], 'E1012: Type mismatch; expected bool but got list<unknown>', 'E745:',…
976 var list = [1, 2, 3]
977 var name = list
978 is list
984 var list = [1, 2, 3]
985 var name = list # comment
987 is list
1121 call CheckDefAndScriptFailure(["var x = [13] > [88]"], 'Cannot compare list with list', 1)
1122 call CheckDefAndScriptFailure(["var x = [13] >= [88]"], 'Cannot compare list with list', 1)
1123 call CheckDefAndScriptFailure(["var x = [13] < [88]"], 'Cannot compare list with list', 1)
1124 call CheckDefAndScriptFailure(["var x = [13] <= [88]"], 'Cannot compare list with list', 1)
1125 call CheckDefAndScriptFailure(["var x = [13] =~ [88]"], 'Cannot compare list with list', 1)
1126 call CheckDefAndScriptFailure(["var x = [13] !~ [88]"], 'Cannot compare list with list', 1)
1129 …eckDefAndScriptFailure(['var j: job', 'var x: list<any>', 'var r = j == x'], 'Cannot compare job w…
1453 var sl: list<string> = glob('*.txt', false, true) + ['']
1684 var ls: list<string> = ['a', <string>g:string_empty]
1685 var ln: list<number> = [<number>g:anint, <number>g:thefour]
1786 var old: list<string> = v:oldfiles
1789 …CheckDefFailure(["var old: list<number> = v:oldfiles"], 'E1012: Type mismatch; expected list<numbe…
1790 …v:oldfiles = ["foo"]', "var old: list<number> = v:oldfiles"], 'E1012: Type mismatch; expected list
1835 # list
1840 var numbers: list<number> = [1, 2, 3]
1844 var strings: list<string> = ['a', 'b', 'c']
1848 var mixed: list<any> = [1, 'b', false,]
1856 var llstring: list<list<string>> = [['text'], []]
1862 var rangelist: list<number> = range(3)
1864 …DefExecAndScriptFailure(["var x: list<string> = g:rangelist"], 'E1012: Type mismatch; expected lis…
1882 CheckDefExecAndScriptFailure(["var l: list<number> = [234, 'x']"], 'E1012:', 1)
1883 CheckDefExecAndScriptFailure(["var l: list<number> = ['x', 234]"], 'E1012:', 1)
1884 CheckDefExecAndScriptFailure(["var l: list<string> = [234, 'x']"], 'E1012:', 1)
1885 CheckDefExecAndScriptFailure(["var l: list<string> = ['x', 123]"], 'E1012:', 1)
1888 var datalist: list<string>
1945 var l: list<number> = [234, 'x']
1950 var l: list<number> = ['x', 234]
1955 var l: list<string> = ['x', 234]
1960 var l: list<string> = [234, 'x']
1968 var list = [Failing]
2331 var dictlist: dict<list<string>> = {absent: [], present: ['hi']}
2589 …ber>", "d = g:list_empty"], 'E1012: Type mismatch; expected dict<number> but got list<unknown>', 2)
2594 # getting the one member should clear the list only after getting the item
2656 # list index cannot be out of range
2665 # list slice accepts out of range
2690 CheckDefExecAndScriptFailure(['echo g:testlist[4]'], 'E684: list index out of range: 4', 1)
2982 CheckScriptFailure(lines, 'E1012: Type mismatch; expected number but got list<number>')
3211 # funcref call, using list index
3334 var list = [0, 1, 2, 3, 4]
3335 assert_equal(0, list[0])
3336 assert_equal(4, list[4])
3337 assert_equal(4, list[-1])
3338 assert_equal(0, list[-5])
3340 assert_equal([0, 1, 2, 3, 4], list[0 : 4])
3341 assert_equal([0, 1, 2, 3, 4], list[:])
3342 assert_equal([1, 2, 3, 4], list[1 :])
3343 assert_equal([2, 3, 4], list[2 : -1])
3344 assert_equal([4], list[4 : -1])
3345 assert_equal([], list[5 : -1])
3346 assert_equal([], list[999 : -1])
3347 assert_equal([1, 2, 3, 4], list[g:theone : g:thefour])
3349 assert_equal([0, 1, 2, 3], list[0 : 3])
3350 assert_equal([0], list[0 : 0])
3351 assert_equal([0, 1, 2, 3, 4], list[0 : -1])
3352 assert_equal([0, 1, 2], list[0 : -3])
3353 assert_equal([0], list[0 : -5])
3354 assert_equal([], list[0 : -6])
3355 assert_equal([], list[0 : -99])