mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
refactor: remove char_u (#22829)
Closes https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -12,7 +12,7 @@ describe('trunc_string', function()
|
||||
local buflen = 40
|
||||
local function test_inplace(s, expected, room)
|
||||
room = room and room or 20
|
||||
local buf = cimp.xmalloc(ffi.sizeof('char_u') * buflen)
|
||||
local buf = cimp.xmalloc(ffi.sizeof('char') * buflen)
|
||||
ffi.C.strcpy(buf, s)
|
||||
cimp.trunc_string(buf, buf, room, buflen)
|
||||
eq(expected, ffi.string(buf))
|
||||
@@ -21,7 +21,7 @@ describe('trunc_string', function()
|
||||
|
||||
local function test_copy(s, expected, room)
|
||||
room = room and room or 20
|
||||
local buf = cimp.xmalloc(ffi.sizeof('char_u') * buflen)
|
||||
local buf = cimp.xmalloc(ffi.sizeof('char') * buflen)
|
||||
local str = cimp.xstrdup(to_cstr(s))
|
||||
cimp.trunc_string(str, buf, room, buflen)
|
||||
eq(expected, ffi.string(buf))
|
||||
|
||||
Reference in New Issue
Block a user