diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-04-15 10:40:30 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-04-16 10:04:47 -0400 |
commit | 7102fec257835302cb4978160bba4cbebd0b63e1 (patch) | |
tree | e3834b7a8054f17426decfb4518e3f53e0d73c35 /tests/run.sh | |
parent | 52e1a31d6513fe9179f756b61881b5f440d2972e (diff) | |
download | bfs-7102fec257835302cb4978160bba4cbebd0b63e1.tar.xz |
tests: Switch from unbuffer to ptyx
unbuffer is part of expect, which is not actively maintained. This
recently led to a CI failure on NetBSD which looked like
can't find package Expect
while executing
"package require Expect"
(file "/usr/pkg/bin/unbuffer" line 6)
Rather than debug this, I just reimplemented unbuffer myself. This also
reduces our test dependencies, which is nice.
Link: https://sourceforge.net/p/expect/bugs/107/
Link: https://github.com/tavianator/bfs/actions/runs/14421150823/job/40444068385
Diffstat (limited to 'tests/run.sh')
-rw-r--r-- | tests/run.sh | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/run.sh b/tests/run.sh index e3a4e3f..8d3a5d2 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -362,20 +362,12 @@ invoke_bfs() { fi } -if command -v unbuffer &>/dev/null; then - UNBUFFER=unbuffer -elif command -v expect_unbuffer &>/dev/null; then - UNBUFFER=expect_unbuffer -fi - # Run bfs with a pseudo-terminal attached bfs_pty() { - test -n "${UNBUFFER:-}" || skip - bfs_verbose "$@" local ret=0 - "$UNBUFFER" bash -c 'stty cols 80 rows 24 && "$@" </dev/null' bash "${BFS[@]}" "$@" || ret=$? + "$PTYX" -w80 -h24 -- "${BFS[@]}" "$@" || ret=$? if ((ret > 125)); then exit $ret |