-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior trying to set job.cwd to another value in the same function #537
Comments
This is the test result:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tree structure of the project:
This test tries to:
johb.lua
johb_1.lua
get_p:sync()
withcwd
set onvim.fn.expand('%:p:h')
vim.api.nvim_set_current_buf
cwd
tovim.fn.expand('%:p:h')
get_p.cwd
with the local variablecwd
get_p:sync()
withget_p.cwd
set as the local variablecwd
Take a look at test 1:
I've set
local cwd = vim.fn.expand('%:p:h')
Move focus to buffer 2 and reset that with the same expand
The test passed.
In tests 2, 3 I've done the same thing and set the
job.cwd
property to the local cwd but the test failed.This is something strange to me because in tests 2, 3, 4 only the second part of the test fails when I reset the
cwd
variableTo be sure to reproduce exactly how I do:
johb.lua
andjohb_1.lua
it's not important, I've leaved them both empty )local path_to_johb
andlocal path_to_johb_1
with the correct path, based on your local machinenvim --headless -c 'PlenaryBustedFile johb_test.lua'
Running the command from the terminal returns this result:
It's possible that I've missed or misunderstood something...
The text was updated successfully, but these errors were encountered: