Skip to content
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

v.util: improve find_diff_cmd: don't add spaces to result without env opts #21242

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Apr 9, 2024

  • Adds test for the diff util module.

  • Fixes an issue where find_working_diff_command()! adds spaces to the result, potentially making it unavailable to other commands. E.g. os.find_abs_path_of_executable would not find the result of the function.

    cmd := util.find_working_diff_command()!
    dump(os.find_abs_path_of_executable(cmd)!)

Might even be required to make the changes in #21243 robust.

vlib/v/util/diff/diff.v Outdated Show resolved Hide resolved
@ttytm
Copy link
Member Author

ttytm commented Apr 11, 2024

Let's please prefer #21247 over this one since conflicts due to test extension will have to be resolved in one of them. It should cover potential mac CI failure after a merge as well.

@spytheman
Copy link
Member

#21247 is merged now.

@ttytm ttytm force-pushed the util/add-test-improve-find-working-diff branch from 32ddb7f to a4583f8 Compare April 11, 2024 14:58
@ttytm ttytm changed the title util: add tests, improve find_diff_cmd: don't add spaces to result without env opts v.util: improve find_diff_cmd: don't add spaces to result without env opts Apr 11, 2024
@ttytm ttytm force-pushed the util/add-test-improve-find-working-diff branch from a4583f8 to 74486d3 Compare April 11, 2024 14:59
@spytheman spytheman merged commit 76b85a0 into vlang:master Apr 12, 2024
56 checks passed
@ttytm ttytm deleted the util/add-test-improve-find-working-diff branch April 12, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants