diff --git a/tests/test.sh b/tests/test.sh index 934407e..4e07886 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -32,7 +32,8 @@ expect() { echo "$expected_output" > "$tmp_expected" - "$fd" "$@" | sed -e 's/\x0/NULL\n/g' | sort -f > "$tmp_output" + # Use python instead of sed here (for this to work on macOS) + "$fd" "$@" | python -c 'import sys; sys.stdout.write(sys.stdin.read().replace("\0", "NULL\n"))' | sort -f > "$tmp_output" echo -ne " ${bold}▶${reset} Testing 'fd $*' ... "