#!/usr/bin/env bash # Row 55 smoke run: opens the app in a pty at 80x24 against a fixture # config (never the real bus), presses ? Esc t q, and prints what the # terminal got after the last frame. Usage: smoke.sh set -euo pipefail REPO="$(cd "$1" && pwd)"; S="$(mkdir -p "$2" && cd "$2" && pwd)" cat > "$S/mkfix.mjs" < "$S/drive.out" # The tail after the alternate screen closes: the quit line and the exit code. sed -n 's/.*\x1b\[?1049l//p; /^EXIT=/p' "$S/drive.out" | tr -d '\r' grep -c $'\x1b\[?1049h' "$S/drive.out" | sed 's/^/alternate screen entered: /' grep -c $'\x1b\[?1049l' "$S/drive.out" | sed 's/^/alternate screen left: /'