aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval/typval_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-15 19:16:19 +0800
committerGitHub <noreply@github.com>2023-08-15 19:16:19 +0800
commit842a47d6a4103a75e33c2c0023dbae5ad2c0f534 (patch)
tree9d1b92e4a36477bae40673233998ac8390a24a9b /test/unit/eval/typval_spec.lua
parent7aad4643f9a6c2c3cc3033ae6dafef71036d3585 (diff)
downloadrneovim-842a47d6a4103a75e33c2c0023dbae5ad2c0f534.tar.gz
rneovim-842a47d6a4103a75e33c2c0023dbae5ad2c0f534.tar.bz2
rneovim-842a47d6a4103a75e33c2c0023dbae5ad2c0f534.zip
vim-patch:9.0.1704: Cannot use positional arguments for printf() (#24719)
Problem: Cannot use positional arguments for printf() Solution: Support positional arguments in string formatting closes: vim/vim#12140 https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
Diffstat (limited to 'test/unit/eval/typval_spec.lua')
-rw-r--r--test/unit/eval/typval_spec.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/eval/typval_spec.lua b/test/unit/eval/typval_spec.lua
index a60700287f..6fb8ba5a1c 100644
--- a/test/unit/eval/typval_spec.lua
+++ b/test/unit/eval/typval_spec.lua
@@ -1439,7 +1439,7 @@ describe('typval.c', function()
eq('3', tv_list_find_str(l, 2))
eq('3', tv_list_find_str(l, -3))
- alloc_log:check({a.freed(alloc_log.null)})
+ alloc_log:check({a.freed(alloc_log.null), a.freed(alloc_log.null)})
end)
itp('returns string when used with VAR_STRING items', function()
local l = list('1', '2', '3', '4', '5')
@@ -1768,7 +1768,7 @@ describe('typval.c', function()
local s44 = check_emsg(function() return lib.tv_dict_get_string(d, 't', false) end,
nil)
eq('44.0', ffi.string(s44))
- alloc_log:check({a.freed(alloc_log.null)})
+ alloc_log:check({a.freed(alloc_log.null), a.freed(alloc_log.null)})
end)
itp('allocates a string copy when requested', function()
local function tv_dict_get_string_alloc(d, key, emsg, is_float)
@@ -1779,7 +1779,7 @@ describe('typval.c', function()
if not emsg then
if s_ret then
if is_float then
- alloc_log:check({a.freed(alloc_log.null), a.str(ret, s_ret)})
+ alloc_log:check({a.freed(alloc_log.null), a.freed(alloc_log.null), a.str(ret, s_ret)})
else
alloc_log:check({a.str(ret, s_ret)})
end
@@ -1810,7 +1810,7 @@ describe('typval.c', function()
local s_ret = (ret ~= nil) and ffi.string(ret) or nil
if not emsg then
if is_float then
- alloc_log:check({a.freed(alloc_log.null)})
+ alloc_log:check({a.freed(alloc_log.null), a.freed(alloc_log.null)})
else
alloc_log:check({})
end
@@ -1856,7 +1856,7 @@ describe('typval.c', function()
local s_ret = (ret ~= nil) and ffi.string(ret) or nil
if not emsg then
if is_float then
- alloc_log:check({a.freed(alloc_log.null)})
+ alloc_log:check({a.freed(alloc_log.null), a.freed(alloc_log.null)})
else
alloc_log:check({})
end
@@ -3018,7 +3018,7 @@ describe('typval.c', function()
if emsg then
alloc_log:clear()
elseif tv.v_type == lib.VAR_FLOAT then
- alloc_log:check({a.freed(alloc_log.null)})
+ alloc_log:check({a.freed(alloc_log.null), a.freed(alloc_log.null)})
else
alloc_log:check({})
end