diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-10-06 11:56:31 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-10-06 11:59:57 -0400 |
commit | 14c610d1e2849c1d162adf6f43b72e023780ffde (patch) | |
tree | febedf7e25a9a6c918ba362941688d7b7acb41d1 /tests | |
parent | 5e7b5eeb59f9f46ce916aaf968dd42570570580a (diff) | |
download | bfs-14c610d1e2849c1d162adf6f43b72e023780ffde.tar.xz |
tests: Check for expect_unbuffer too
That's where FreeBSD installs it.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tests.sh | 10 |
1 files changed, 8 insertions, 2 deletions
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 |