# KHAELOR # File: tests/tui/fixtures/pty-echo.exp # Description: PTY live-echo probe — types "hello" into the idle app and reports whether it echoes before Enter. # # Author: Simon-Pierre Boucher # Contact: contact@spboucher.ai set timeout 15 log_user 0 spawn node node_modules/tsx/dist/cli.mjs tests/tui/fixtures/pty-echo-app.ts # The KHAELOR wordmark is gradient-painted (an SGR code between every # character), so match the plain model line to detect the first paint. expect { "claude-fixture" { send_user "STARTUP_OK\n" } timeout { send_user "STARTUP_TIMEOUT\n"; exit 1 } } expect { "What do you want to build?" { send_user "BOX_VISIBLE\n" } timeout { send_user "BOX_MISSING\n" } } sleep 0.5 set t0 [clock milliseconds] send -- "hello" set timeout 3 expect { "hello" { send_user "ECHO_VISIBLE [expr [clock milliseconds] - $t0]ms\n" } timeout { send_user "ECHO_MISSING\n" } } # Enter is never sent — Ctrl+C clears, Ctrl+C again quits. send -- "\x03\x03" set timeout 5 expect eof