test: resolve the temp repo path so specs pass on macos - #432
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
26 specs fail on macOS and pass on Linux: 16 failures and 10 errors across
actions_spec,commands_specandrender_spec.vim.fn.tempname()returns a path under/var/folders/..., and on macOS/varisa symlink to
/private/var. Git resolves it, the spec does not, so the two disagreeabout where the repo is:
Confirmed by building the same fixture both ways — with the unresolved path the
rendered diff has no
deleted file modeline, with the resolved one it does. Linuxtempname()gives/tmp/...with no symlink, which is why CI never saw it.Solution
Resolve the path where the fixture is created:
vim.fn.resolve(vim.fn.tempname()),14 sites across 8 spec files.
resolvehandles the not-yet-created leaf, resolvingthe parent symlinks.
Applied to every
tempname()inspec/, not only the failing three, so the nextgit-backed fixture does not reintroduce it.
802 successes / 0 failures / 0 errors, up from 776/16/10. No change to
lua/.