view src/testdir/test91.in @ 11376:78d7b92bfb1d v8.0.0573

patch 8.0.0573: running parallel make after distclean fails commit https://github.com/vim/vim/commit/91b6e4591a839139f720798a2efbe83b2ecf8446 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 20 22:32:24 2017 +0200 patch 8.0.0573: running parallel make after distclean fails Problem: Running parallel make after distclean fails. (Manuel Ortega) Solution: Instead of using targets "scratch config myself" use "reconfig".
author Christian Brabandt <cb@256bit.org>
date Thu, 20 Apr 2017 22:45:03 +0200
parents 5780bd3a5a7e
children
line wrap: on
line source

Tests for getwinvar(), gettabvar() and gettabwinvar().
vim: set ft=vim :

STARTTEST
:so small.vim
:so mbyte.vim
:"
:" Use strings to test for memory leaks.
:" First, check that in an empty window, gettabvar() returns the correct value
:let t:testvar='abcd'
:$put =string(gettabvar(1,'testvar'))
:$put =string(gettabvar(1,'testvar'))
:"
:" test for getwinvar()
:let w:var_str = "Dance"
:let def_str = "Chance"
:$put =string(getwinvar(1, 'var_str'))
:$put =string(getwinvar(1, 'var_str', def_str))
:$put =string(getwinvar(1, ''))
:$put =string(getwinvar(1, '', def_str))
:unlet w:var_str
:$put =string(getwinvar(1, 'var_str', def_str))
:$put =string(getwinvar(1, ''))
:$put =string(getwinvar(1, '', def_str))
:$put =string(getwinvar(9, ''))
:$put =string(getwinvar(9, '', def_str))
:$put =string(getwinvar(1, '&nu'))
:$put =string(getwinvar(1, '&nu',  1))
:unlet def_str
:"
:" test for gettabvar()
:tabnew
:tabnew
:let t:var_list = [1, 2, 3]
:let t:other = 777
:let def_list = [4, 5, 6, 7]
:tabrewind
:$put =string(gettabvar(3, 'var_list'))
:$put =string(gettabvar(3, 'var_list', def_list))
:$put =string(gettabvar(3, ''))
:$put =string(gettabvar(3, '', def_list))
:tablast
:unlet t:var_list
:tabrewind
:$put =string(gettabvar(3, 'var_list', def_list))
:$put =string(gettabvar(9, ''))
:$put =string(gettabvar(9, '', def_list))
:$put =string(gettabvar(3, '&nu'))
:$put =string(gettabvar(3, '&nu', def_list))
:unlet def_list
:tabonly
:"
:" test for gettabwinvar()
:tabnew
:tabnew
:tabprev
:split
:split
:wincmd w
:vert split
:wincmd w
:let w:var_dict = {'dict': 'tabwin'}
:let def_dict = {'dict2': 'newval'}
:wincmd b
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict'))
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST

start: