CI: test: Avoid QuickBuild hang. (#5330)

Delete the CWD using nvim instead of the external lua/test runner process.
This commit is contained in:
Justin M. Keyes 2016-09-12 03:18:48 +02:00 committed by GitHub
parent 4ceacb37d5
commit b801291bec

View File

@ -270,20 +270,18 @@ for _, cmd in ipairs {'getcwd', 'haslocaldir'} do
end end
describe("getcwd()", function () describe("getcwd()", function ()
local temp_dir = "Xtest-functional-ex_cmds-cd_spec.temp"
before_each(function() before_each(function()
clear() clear()
lfs.mkdir(temp_dir) lfs.mkdir(directories.global)
end) end)
after_each(function() after_each(function()
helpers.rmdir(temp_dir) helpers.rmdir(directories.global)
end) end)
it("returns empty string if working directory does not exist", function() it("returns empty string if working directory does not exist", function()
execute("cd " .. temp_dir) execute("cd "..directories.global)
helpers.wait() execute("call delete('../"..directories.global.."', 'd')")
helpers.rmdir(temp_dir)
eq("", helpers.eval("getcwd()")) eq("", helpers.eval("getcwd()"))
end) end)
end) end)