a73x

a1ed572c

test: the last padded wc count

a73x   2026-09-04 10:16

Commit message
test: the last padded wc count

The drag-copy leg compared a `wc -l` result to a string, which BSD wc pads
to a column width. It was the last one: every wc result in the suite is
now read numerically or trimmed, checked by walking each variable assigned
from a wc pipeline through to its comparisons.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SakwJEwD9dXBoRP5kWbemW

test/e2e_11_select.sh
Old New
@@ -195,7 +195,8 @@ rc0 "drag copy: ptyclient leg exited $RC (no OSC 52 with the dragged text?):" "$
195 # nothing to copy, and a client that copied on every button release would 195 # nothing to copy, and a client that copied on every button release would
196 # have written two. 196 # have written two.
197 SELCOPIES=$(grep -ao "$(printf '\033]52;')" "$OUT.selcap" | wc -l) 197 SELCOPIES=$(grep -ao "$(printf '\033]52;')" "$OUT.selcap" | wc -l)
198 [ "$SELCOPIES" = "1" ] || { 198 # -eq and not =: BSD wc pads its count to a column width.
199 [ "$SELCOPIES" -eq 1 ] || {
199 echo "e2e FAIL: drag copy: $SELCOPIES OSC 52 writes on the client's tty, expected 1"; exit 1; } 200 echo "e2e FAIL: drag copy: $SELCOPIES OSC 52 writes on the client's tty, expected 1"; exit 1; }
200 # ---- a drag over WIDE cells leaves the client's screen converged ------- 201 # ---- a drag over WIDE cells leaves the client's screen converged -------
201 # 202 #