mirror of
https://github.com/vim/vim.git
synced 2025-10-27 09:24:23 -04:00
updated for version 7.0f
This commit is contained in:
@@ -13,6 +13,12 @@ STARTTEST
|
||||
:catch
|
||||
: $put =v:exception[:14]
|
||||
:endtry
|
||||
:" List slices
|
||||
:$put =string(l[:])
|
||||
:$put =string(l[1:])
|
||||
:$put =string(l[:-2])
|
||||
:$put =string(l[0:8])
|
||||
:$put =string(l[8:-1])
|
||||
:"
|
||||
:" List identity
|
||||
:let ll = l
|
||||
@@ -80,6 +86,57 @@ STARTTEST
|
||||
:unlet d[-1]
|
||||
:$put =string(d)
|
||||
:"
|
||||
:" removing items out of range: silently skip items that don't exist
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[2:1]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[2:2]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[2:3]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[2:4]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[2:5]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[-1:2]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[-2:2]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[-3:2]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[-4:2]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[-5:2]
|
||||
:$put =string(l)
|
||||
let l = [0, 1, 2, 3]
|
||||
:unlet l[-6:2]
|
||||
:$put =string(l)
|
||||
:"
|
||||
:" assignment to a list
|
||||
:let l = [0, 1, 2, 3]
|
||||
:let [va, vb] = l[2:3]
|
||||
:$put =va
|
||||
:$put =vb
|
||||
:try
|
||||
: let [va, vb] = l
|
||||
:catch
|
||||
: $put =v:exception[:14]
|
||||
:endtry
|
||||
:try
|
||||
: let [va, vb] = l[1:1]
|
||||
:catch
|
||||
: $put =v:exception[:14]
|
||||
:endtry
|
||||
:"
|
||||
:" manipulating a big Dictionary (hashtable.c has a border of 1000 entries)
|
||||
:let d = {}
|
||||
:for i in range(1500)
|
||||
|
||||
@@ -3,6 +3,11 @@ start:
|
||||
{'a': 1}
|
||||
1
|
||||
Vim(put):E684:
|
||||
[1, 'as''d', [1, 2, function('strlen')], {'a': 1}]
|
||||
['as''d', [1, 2, function('strlen')], {'a': 1}]
|
||||
[1, 'as''d', [1, 2, function('strlen')]]
|
||||
[1, 'as''d', [1, 2, function('strlen')], {'a': 1}]
|
||||
[]
|
||||
101101
|
||||
{'1': 'asd', 'b': [1, 2, function('strlen')], '-1': {'a': 1}}asd
|
||||
['-1', '1', 'b']
|
||||
@@ -19,6 +24,21 @@ Vim(let):E706: l
|
||||
[1, 'as''d', {'a': 1}]
|
||||
[4]
|
||||
{'1': 99, '3': 33}
|
||||
[0, 1, 2, 3]
|
||||
[0, 1, 3]
|
||||
[0, 1]
|
||||
[0, 1]
|
||||
[0, 1]
|
||||
[0, 1, 2, 3]
|
||||
[0, 1, 3]
|
||||
[0, 3]
|
||||
[3]
|
||||
[3]
|
||||
[3]
|
||||
2
|
||||
3
|
||||
Vim(let):E687:
|
||||
Vim(let):E688:
|
||||
3000 2900 2001 1600 1501
|
||||
Vim(let):E716: 1500
|
||||
NONE 2999
|
||||
|
||||
Reference in New Issue
Block a user