Refresh generated neovim config
This commit is contained in:
@ -20,10 +20,14 @@ describe("Follow cwd change", function()
|
||||
vim.cmd(":bdelete")
|
||||
end)
|
||||
it("ensures both sessions were created", function()
|
||||
require("persisted").load()
|
||||
|
||||
local pattern = "/"
|
||||
local name1 = vim.fn.getcwd():gsub(pattern, "%%") .. require("persisted").get_branch() .. ".vim"
|
||||
local branch1 = require("persisted").get_branch()
|
||||
local name1 = vim.fn.getcwd():gsub(pattern, "%%") .. (branch1 or "") .. ".vim"
|
||||
vim.cmd(":cd ../..")
|
||||
local name2 = vim.fn.getcwd():gsub(pattern, "%%") .. require("persisted").get_branch() .. ".vim"
|
||||
local branch2 = require("persisted").get_branch()
|
||||
local name2 = vim.fn.getcwd():gsub(pattern, "%%") .. (branch2 or "") .. ".vim"
|
||||
|
||||
local sessions = vim.fn.readdir(session_dir)
|
||||
assert.equals(sessions[1], name1)
|
||||
@ -52,7 +56,8 @@ describe("Don't follow cwd change", function()
|
||||
it("ensures only one session was created", function()
|
||||
local pattern = "/"
|
||||
vim.cmd(":cd ../..")
|
||||
local name = vim.fn.getcwd():gsub(pattern, "%%") .. require("persisted").get_branch() .. ".vim"
|
||||
local branch = require("persisted").get_branch()
|
||||
local name = vim.fn.getcwd():gsub(pattern, "%%") .. (branch or "") .. ".vim"
|
||||
|
||||
local sessions = vim.fn.readdir(session_dir)
|
||||
assert.equals(#sessions, 1)
|
||||
|
||||
@ -5,6 +5,6 @@ runtime! plugin/plenary.vim
|
||||
command Setup PlenaryBustedDirectory tests/setup {minimal_init = 'tests/minimal.vim'}
|
||||
command TestAutoloading PlenaryBustedDirectory tests/autoload {minimal_init = 'tests/minimal.vim'}
|
||||
command TestGitBranching PlenaryBustedDirectory tests/git_branching {minimal_init = 'tests/minimal.vim'}
|
||||
command TestFollowCwd PlenaryBustedDirectory tests/follow_cwd/follow_cwd.lua {minimal_init = 'tests/minimal.vim'}
|
||||
command TestFollowCwd PlenaryBustedDirectory tests/follow_cwd {minimal_init = 'tests/minimal.vim'}
|
||||
command TestDefaults PlenaryBustedFile tests/default_settings_spec.lua
|
||||
command TearDown PlenaryBustedFile tests/teardown/clean_up_dirs.lua
|
||||
|
||||
Reference in New Issue
Block a user