Skip to content

Commit d21dc14

Browse files
committed
test: do not hardcode /bin/true in the harness
OpenBSD has true(1) in /usr/bin, so EDITOR=/bin/true and OPENER=/bin/true made mw -r fail with '/bin/true: not found'. Resolve true through PATH.
1 parent e0e2d22 commit d21dc14

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/run_tests.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ H10=$(mkhome "$TMP/h10")
413413
mw "$H10" -a one@example.com -f -x p -i i1.example.com -s s1.example.com >/dev/null 2>&1
414414
mw "$H10" -a two@example.com -f -x p -i i2.example.com -s s2.example.com >/dev/null 2>&1
415415
mkdir -p "$TMP/mwtmp"
416-
EDITOR=/bin/true TMPDIR="$TMP/mwtmp" expect "mw -r reorders accounts" mw "$H10" -r
416+
# `true` is resolved through PATH: /bin/true does not exist on OpenBSD.
417+
EDITOR=true TMPDIR="$TMP/mwtmp" expect "mw -r reorders accounts" mw "$H10" -r
417418
expect_file "muttrc regenerated with i1 macro" "$H10/.config/mutt/muttrc" 'macro index,pager i1'
418419
expect_file "muttrc regenerated with i2 macro" "$H10/.config/mutt/muttrc" 'macro index,pager i2'
419420
expect_file "default account sourced first" "$H10/.config/mutt/muttrc" "source $H10/.config/mutt/accounts/one@example.com.muttrc"
@@ -519,7 +520,7 @@ while [ "$(wc -l <"$OPENED_LOG" 2>/dev/null || echo 0)" -lt 2 ] && [ "$i" -lt 10
519520
done
520521
expect_file "macOS open recorded" "$OPENED_LOG" 'attach file.txt'
521522

522-
OPENER=/bin/true expect 'openfile honors $OPENER' \
523+
OPENER=true expect 'openfile honors $OPENER' \
523524
openfile "$H15" "$TMP/attach file.txt"
524525

525526
############################################################

0 commit comments

Comments
 (0)