0
0
mirror of https://github.com/vim/vim.git synced 2025-10-31 09:57:14 -04:00

updated for version 7.3.898

Problem:    Memory leak reported by valgrind in test 91.
Solution:   Only use default argument when needed.
This commit is contained in:
Bram Moolenaar
2013-04-15 15:15:35 +02:00
parent 768baacdc8
commit 54c34fa6f5
4 changed files with 47 additions and 30 deletions

View File

@@ -4,9 +4,10 @@ vim: set ft=vim :
STARTTEST
:so small.vim
:"
:" test for getbufvar()
:let b:var_num = 1234
:let def_num = 5678
:" Test for getbufvar()
:" Use strings to test for memory leaks.
:let b:var_num = '1234'
:let def_num = '5678'
:$put =string(getbufvar(1, 'var_num'))
:$put =string(getbufvar(1, 'var_num', def_num))
:$put =string(getbufvar(1, ''))

View File

@@ -1,13 +1,13 @@
start:
1234
1234
{'var_num': 1234}
{'var_num': 1234}
5678
'1234'
'1234'
{'var_num': '1234'}
{'var_num': '1234'}
'5678'
{}
{}
''
5678
'5678'
0
0
'Dance'