aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/edit_spec.lua
diff options
context:
space:
mode:
authorChris LaRose <cjlarose@gmail.com>2020-01-26 00:24:42 -0800
committerJustin M. Keyes <justinkz@gmail.com>2020-01-26 00:24:42 -0800
commitc6ff23d7a0d5ccf0d8995e3204c18df55d28fc7f (patch)
tree0614f7241a3fccd0c708d541bdc9e5ab4e15afca /test/functional/terminal/edit_spec.lua
parent451af7f08779ba39d3ebef4b2295ba702cc4f3d7 (diff)
downloadrneovim-c6ff23d7a0d5ccf0d8995e3204c18df55d28fc7f.tar.gz
rneovim-c6ff23d7a0d5ccf0d8995e3204c18df55d28fc7f.tar.bz2
rneovim-c6ff23d7a0d5ccf0d8995e3204c18df55d28fc7f.zip
terminal: absolute CWD in term:// URI #11289
This makes it possible to restore the working directory of :terminal buffers when reading those buffers from a session file. Fixes #11288 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'test/functional/terminal/edit_spec.lua')
-rw-r--r--test/functional/terminal/edit_spec.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/terminal/edit_spec.lua b/test/functional/terminal/edit_spec.lua
index d213bae7b3..fabc5524ed 100644
--- a/test/functional/terminal/edit_spec.lua
+++ b/test/functional/terminal/edit_spec.lua
@@ -5,9 +5,12 @@ local curbufmeths = helpers.curbufmeths
local curwinmeths = helpers.curwinmeths
local nvim_dir = helpers.nvim_dir
local command = helpers.command
+local funcs = helpers.funcs
local meths = helpers.meths
local clear = helpers.clear
local eq = helpers.eq
+local matches = helpers.matches
+local pesc = helpers.pesc
describe(':edit term://*', function()
local get_screen = function(columns, lines)
@@ -28,7 +31,8 @@ describe(':edit term://*', function()
command('edit term://')
local termopen_runs = meths.get_var('termopen_runs')
eq(1, #termopen_runs)
- eq(termopen_runs[1], termopen_runs[1]:match('^term://.//%d+:$'))
+ local cwd = funcs.fnamemodify('.', ':p:~'):gsub([[[\/]*$]], '')
+ matches('^term://'..pesc(cwd)..'//%d+:$', termopen_runs[1])
end)
it("runs TermOpen early enough to set buffer-local 'scrollback'", function()