feat: builtin support for editing files over ssh (#27)
This commit is contained in:
parent
75b710e311
commit
ca4da68aae
18 changed files with 593 additions and 291 deletions
|
|
@ -1,35 +1,40 @@
|
|||
require("plenary.async").tests.add_to_env()
|
||||
local oil = require("oil")
|
||||
local test_util = require("tests.test_util")
|
||||
|
||||
describe("window options", function()
|
||||
a.describe("window options", function()
|
||||
after_each(function()
|
||||
test_util.reset_editor()
|
||||
end)
|
||||
|
||||
it("Restores window options on close", function()
|
||||
a.it("Restores window options on close", function()
|
||||
vim.cmd.edit({ args = { "README.md" } })
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd("BufReadPost")
|
||||
assert.equals("no", vim.o.signcolumn)
|
||||
oil.close()
|
||||
assert.equals("auto", vim.o.signcolumn)
|
||||
end)
|
||||
|
||||
it("Restores window options on edit", function()
|
||||
a.it("Restores window options on edit", function()
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd("BufReadPost")
|
||||
assert.equals("no", vim.o.signcolumn)
|
||||
vim.cmd.edit({ args = { "README.md" } })
|
||||
assert.equals("auto", vim.o.signcolumn)
|
||||
end)
|
||||
|
||||
it("Restores window options on split <filename>", function()
|
||||
a.it("Restores window options on split <filename>", function()
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd("BufReadPost")
|
||||
assert.equals("no", vim.o.signcolumn)
|
||||
vim.cmd.split({ args = { "README.md" } })
|
||||
assert.equals("auto", vim.o.signcolumn)
|
||||
end)
|
||||
|
||||
it("Restores window options on split", function()
|
||||
a.it("Restores window options on split", function()
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd("BufReadPost")
|
||||
assert.equals("no", vim.o.signcolumn)
|
||||
vim.cmd.split()
|
||||
vim.cmd.edit({ args = { "README.md" } })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue