From fde8f2e8e3c93bfc2732f3e429bfdc1869227acf Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 9 Sep 2017 16:42:10 +0200 Subject: [PATCH] Try to fix test on macOS --- tests/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 $*' ... "