lib.fileset: Fix tests on Darwin, more POSIX #291933
Merged
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.
Description of changes
This was found when trying to run the fileset tests on Darwin, which mysteriously fail:
After dissecting this, I find out that apparently
\s
works on Linux, but not on Darwin for some reason!From the bash source code, it looks like
<regex.h>
withREG_EXTENDED
is used for all platforms the same, so there's nothing odd there. It's almost impossible to know where<regex.h>
comes from, but it looks to be a POSIX thing.So after digging through the almost impossible to find POSIX specifications, I can indeed confirm that there's no mention of
\s
or the like!However, there is a mention of
[[:blank:]]
, which indeed does work on Darwin too! So we'll use that instead.Things done
This work is sponsored by Antithesis ✨
Add a 👍 reaction to pull requests you find important.