dont use grep -P for cross-platform compatibility
`grep -P` gives access to the PCRE matching engine, which is nice, however, the version of grep shipped on many BSD systems (including Darwin) does not have this flag. Currently, `grep -P` was being used in the `_includes()` test helper. For cross platform compatibility in tests, do not rely upon this option. Luckily, all existing tests seem to work fine without it already!
This commit is contained in:
@@ -82,7 +82,7 @@ test_ls_with_file_shortcuts() {
|
||||
ls_with_file_shortcuts > $temp_file
|
||||
ls_output=$(<$temp_file strip_colors)
|
||||
|
||||
# Compare as fixed strings (F), instead of regex (P)
|
||||
# Compare as fixed strings (F), instead of normal grep behavior
|
||||
assertIncludes "$ls_output" '[1] a "b"' F
|
||||
assertIncludes "$ls_output" "[2] a 'b'" F
|
||||
assertIncludes "$ls_output" '[3] a [b]' F
|
||||
|
||||
Reference in New Issue
Block a user