The core problem seemed to be that on macos, sed doesn't recognize the \w escape character (meaning a letter in a word). So, I replaced \w with [a-zA-Z0-9_] (there are probably characters covered by \w not covered by my replacement, but this captures all the test names we are currently using).
I also made changes to the sed command to make it a bit more readable (at least to me). This meant replacing \ with | as the delimeter of the sed command, and pasing the -r flag to use extended regular expressions (saving us from having to escape parentheses when using them to capture a group, for example).
I did read that -r works for gnu sed while -E is the command to use for macos sed, but both worked on both the ubuntu and the macos machines I tested on.
The core problem seemed to be that on macos, sed doesn't recognize the
\w
escape character (meaning a letter in a word). So, I replaced\w
with[a-zA-Z0-9_]
(there are probably characters covered by\w
not covered by my replacement, but this captures all the test names we are currently using).I also made changes to the sed command to make it a bit more readable (at least to me). This meant replacing
\
with|
as the delimeter of the sed command, and pasing the-r
flag to use extended regular expressions (saving us from having to escape parentheses when using them to capture a group, for example).I did read that
-r
works for gnu sed while-E
is the command to use for macos sed, but both worked on both the ubuntu and the macos machines I tested on.