1
0
Fork 0
mirror of synced 2024-12-26 08:43:19 -05:00
ultimate-vim/sources_non_forked/tlib/spec/tlib/eval.vim
2021-08-04 15:52:11 +02:00

27 lines
791 B
VimL

" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
" @Website: https://github.com/tomtom
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2015-10-26.
" @Last Change: 2015-10-26.
let s:save_cpo = &cpo
set cpo&vim
SpecBegin 'title': 'tlib#eval'
let g:eval_a = {'foo': range(0, 5), 'd': {'a': range(0, 5)}}
let g:eval_b = {'foo': range(6, 10), 'd': {'a': range(6, 10), 'b': 2}, 'bar': range(5)}
let g:eval_a0 = deepcopy(g:eval_a)
let g:eval_b0 = deepcopy(g:eval_b)
let g:eval_c = {'foo': range(0, 10), 'd': {'a': range(0, 10), 'b': 2}, 'bar': range(5)}
Should be equal tlib#eval#Extend(copy(g:eval_a), g:eval_b), g:eval_c
Should be equal g:eval_a, g:eval_a0
Should be equal g:eval_b, g:eval_b0
let &cpo = s:save_cpo
unlet s:save_cpo