Added test for keymapping
This commit is contained in:
parent
3ac1ce892f
commit
2f61a37975
1 changed files with 9 additions and 0 deletions
|
|
@ -50,4 +50,13 @@ describe("openingh should open", function()
|
||||||
local expected = "/README.md#L5-L10"
|
local expected = "/README.md#L5-L10"
|
||||||
assert.equal(expected, status:sub(-#expected))
|
assert.equal(expected, status:sub(-#expected))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it("file range using a keymap", function()
|
||||||
|
vim.cmd("e ./README.md")
|
||||||
|
vim.api.nvim_set_keymap("n", "ghf", ":OpenInGHFile <cr>", {})
|
||||||
|
vim.cmd("normal ghf")
|
||||||
|
local status = vim.g.OPENINGH_RESULT
|
||||||
|
local expected = "/README.md#L1"
|
||||||
|
assert.equal(expected, status:sub(-#expected))
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue