refactor: move thing out to utils

This commit is contained in:
Oleksandr Smirnov 2025-03-22 23:00:14 +02:00
parent 0c0584edbd
commit 74d7afcc01
No known key found for this signature in database
3 changed files with 15 additions and 10 deletions

View file

@ -1,13 +1,5 @@
local t = require "spec.testutils"
local child = MiniTest.new_child_neovim()
local T = MiniTest.new_set {
hooks = {
post_once = child.stop,
pre_case = function()
child.restart { "-u", t.mininit_path }
end,
},
}
local _, T = t.setup "utils"
T["utils"] = MiniTest.new_set()
T["utils"]["should .remove_empty_lines()"] = function()
@ -26,4 +18,9 @@ T["utils"]["should .readfile_joined()"] = function()
t.eq(u.readfile_joined(tmp), data)
end
T["utils"]["should .trimend()"] = function()
local u = require "gopher._utils"
t.eq(u.trimend " hi ", " hi")
end
return T