aboutsummaryrefslogtreecommitdiff
path: root/test/unit/message_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
commitff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch)
tree729bbcb92231538fa61dab6c3d890b025484b7f5 /test/unit/message_spec.lua
parent376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff)
parent28c04948a1c887a1cc0cb64de79fa32631700466 (diff)
downloadrneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/unit/message_spec.lua')
-rw-r--r--test/unit/message_spec.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/unit/message_spec.lua b/test/unit/message_spec.lua
index 71aa74d90d..fee8f5124d 100644
--- a/test/unit/message_spec.lua
+++ b/test/unit/message_spec.lua
@@ -1,11 +1,11 @@
-local helpers = require('test.unit.helpers')(after_each)
-local itp = helpers.gen_itp(it)
+local t = require('test.unit.testutil')
+local itp = t.gen_itp(it)
-local ffi = helpers.ffi
-local eq = helpers.eq
-local to_cstr = helpers.to_cstr
+local ffi = t.ffi
+local eq = t.eq
+local to_cstr = t.to_cstr
-local cimp = helpers.cimport('./src/nvim/message.h', './src/nvim/memory.h', './src/nvim/strings.h')
+local cimp = t.cimport('./src/nvim/message.h', './src/nvim/memory.h', './src/nvim/strings.h')
describe('trunc_string', function()
local buflen = 40
@@ -33,26 +33,26 @@ describe('trunc_string', function()
{ ['desc'] = 'by copy', ['func'] = test_copy },
}
- for _, t in ipairs(permutations) do
- describe('populates buf ' .. t.desc, function()
+ for _, q in ipairs(permutations) do
+ describe('populates buf ' .. q.desc, function()
itp('with a small string', function()
- t.func('text', 'text')
+ q.func('text', 'text')
end)
itp('with a medium string', function()
- t.func('a short text', 'a short text')
+ q.func('a short text', 'a short text')
end)
itp('with a string of length == 1/2 room', function()
- t.func('a text that fits', 'a text that fits', 34)
+ q.func('a text that fits', 'a text that fits', 34)
end)
itp('with a string exactly the truncate size', function()
- t.func('a text tha just fits', 'a text tha just fits')
+ q.func('a text tha just fits', 'a text tha just fits')
end)
itp('with a string that must be truncated', function()
- t.func('a text that nott fits', 'a text t...nott fits')
+ q.func('a text that nott fits', 'a text t...nott fits')
end)
end)
end