refactor: move thing out to utils
This commit is contained in:
parent
0c0584edbd
commit
74d7afcc01
3 changed files with 15 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue