mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
fix(keys): replace term codes to calculate ids
This commit is contained in:
parent
9223c1aa20
commit
d65a3d6755
2 changed files with 19 additions and 1 deletions
18
tests/handlers/keys_spec.lua
Normal file
18
tests/handlers/keys_spec.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local Keys = require("lazy.core.handler.keys")
|
||||
|
||||
describe("keys", function()
|
||||
it("parses ids correctly", function()
|
||||
local tests = {
|
||||
{ "<C-/>", "<c-/>", true },
|
||||
{ "<C-h>", "<c-H>", true },
|
||||
{ "<C-h>k", "<c-H>K", false },
|
||||
}
|
||||
for _, test in ipairs(tests) do
|
||||
if test[3] then
|
||||
assert.same(Keys.parse(test[1]).id, Keys.parse(test[2]).id)
|
||||
else
|
||||
assert.is_not.same(Keys.parse(test[1]).id, Keys.parse(test[2]).id)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue