. "$BST_LIB" require expect expect/present # expect drives a real pty (spawn/send/expect/wait) — coverage shell cannot do. # On musl/wasm32-hwjs expect starts but execve-EINVALs in spawn (BRINTOS-37): # present-but-broken -> `not ok`, never `skip`. On the glibc arm it embeds the # Tcl interpreter, which made it the second linux-in-the-browser#92 casualty — # interp init reached getpwuid and trapped in the NSS module loader before the # pty path. Fixed upstream 2026-07-14; E2spawn below now exercises the pty for # real and is the witness that both halves stay fixed. out=$(expect "$BST_DATA/selftest_expect.exp" 2>&1); rc=$? case "$out" in *ALL-EXPECT-OK*) all=1 ;; *) all=0 ;; esac if [ "$rc" -eq 0 ] && [ "$all" -eq 1 ]; then bst_ok expect/all-ok else bst_notok expect/all-ok "rc=$rc $(_bst_1line "$out")"; fi for tag in E1ver E2spawn E3regexp E4wait; do case "$out" in *"E-$tag OK"*) bst_ok "expect/$tag" ;; *) bst_notok "expect/$tag" "not OK in output (rc=$rc)" ;; esac done