From 14c610d1e2849c1d162adf6f43b72e023780ffde Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 6 Oct 2023 11:56:31 -0400 Subject: tests: Check for expect_unbuffer too That's where FreeBSD installs it. --- tests/tests.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/tests.sh b/tests/tests.sh index 5297446..662efd9 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -488,11 +488,17 @@ function invoke_bfs() { fi } +if command -v unbuffer &>/dev/null; then + UNBUFFER=unbuffer +elif command -v expect_unbuffer &>/dev/null; then + UNBUFFER=expect_unbuffer +fi + function bfs_pty() { - command -v unbuffer &>/dev/null || skip + test -n "$UNBUFFER" || skip bfs_verbose "$@" - unbuffer bash -c 'stty cols 80 rows 24 && "$@"' bash "${BFS[@]}" "$@" + "$UNBUFFER" bash -c 'stty cols 80 rows 24 && "$@"' bash "${BFS[@]}" "$@" local status="$?" if ((status > 125)); then -- cgit v1.2.3