Compare only filename in test since full url can vary based on how the repo was checked out
This commit is contained in:
parent
9936957f2c
commit
3f8a4b6b5d
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ describe("openingh should open", function()
|
||||||
vim.api.nvim_win_set_cursor(0, { 3, 0 })
|
vim.api.nvim_win_set_cursor(0, { 3, 0 })
|
||||||
vim.cmd("OpenInGHFile")
|
vim.cmd("OpenInGHFile")
|
||||||
local status = vim.g.OPENINGH_RESULT
|
local status = vim.g.OPENINGH_RESULT
|
||||||
local expected = "/blob/main/README.md#L3"
|
local expected = "/README.md#L3"
|
||||||
assert.equal(expected, status:sub(-#expected))
|
assert.equal(expected, status:sub(-#expected))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ describe("openingh should open", function()
|
||||||
vim.api.nvim_buf_set_mark(0, ">", 10, 0, {})
|
vim.api.nvim_buf_set_mark(0, ">", 10, 0, {})
|
||||||
vim.cmd("'<,'>OpenInGHFile")
|
vim.cmd("'<,'>OpenInGHFile")
|
||||||
local status = vim.g.OPENINGH_RESULT
|
local status = vim.g.OPENINGH_RESULT
|
||||||
local expected = "/blob/main/README.md#L5-L10"
|
local expected = "/README.md#L5-L10"
|
||||||
assert.equal(expected, status:sub(-#expected))
|
assert.equal(expected, status:sub(-#expected))
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue