aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/autochdir_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/autochdir_spec.lua')
-rw-r--r--test/functional/legacy/autochdir_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/legacy/autochdir_spec.lua b/test/functional/legacy/autochdir_spec.lua
index 75df1f8c55..89651284b5 100644
--- a/test/functional/legacy/autochdir_spec.lua
+++ b/test/functional/legacy/autochdir_spec.lua
@@ -61,6 +61,20 @@ describe('autochdir behavior', function()
expected_empty()
end)
+ it('win_execute() does not change directory', function()
+ local subdir = 'Xfile'
+ command('cd '..dir)
+ command('set autochdir')
+ call('mkdir', subdir)
+ local winid = eval('win_getid()')
+ command('new '..subdir..'/file')
+ matches('.*'..dir..'[/\\]'..subdir, eval('getcwd()'))
+ command('cd ..')
+ matches('.*'..dir, eval('getcwd()'))
+ call('win_execute', winid, 'echo')
+ matches('.*'..dir, eval('getcwd()'))
+ end)
+
it(':verbose pwd shows whether autochdir is used', function()
local subdir = 'Xautodir'
command('cd '..dir)