Try to fix test on macOS

This commit is contained in:
sharkdp 2017-09-09 16:42:10 +02:00
parent a790f9bd62
commit fde8f2e8e3
1 changed files with 2 additions and 1 deletions

View File

@ -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 $*' ... "