Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions test/test_health.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
local MiniTest = require("mini.test")
local T = MiniTest.new_set()

T["no deprecation warnings with complex config"] = function()
local issues = {}

vim.deprecate = function(name)
table.insert(issues, "DEPRECATED: " .. name)
end
vim.health.warn = function(msg)
table.insert(issues, "WARNING: " .. msg)
end
vim.health.error = function(msg)
table.insert(issues, "ERROR: " .. msg)
end

require("guttermarks").setup({
local_mark = {
enabled = true,
sign = function(mark)
return mark.mark:upper()
end,
highlight_group = "GutterMarksLocal",
priority = 20,
},
global_mark = {
enabled = true,
sign = ">>",
highlight_group = "GutterMarksGlobal",
priority = 21,
},
special_mark = {
enabled = true,
marks = { "'", "^", "." },
sign = function(mark)
return "[" .. mark.mark .. "]"
end,
highlight_group = "GutterMarksSpecial",
priority = 15,
},
autocmd_triggers = { "BufEnter", "TextChanged" },
excluded_filetypes = { "NvimTree", "TelescopePrompt", "" },
excluded_buftypes = { "terminal", "prompt", "quickfix", "nofile" },
})

MiniTest.expect.equality(issues, {})
end

return T
Loading