summaryrefslogtreecommitdiffstats
path: root/tests/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests.sh')
-rwxr-xr-xtests/tests.sh10
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