// pardes-snap: drive a pardes binary with a scripted input trace in a pty and // capture the rendered grid at named sync points. The same script run against // the prototype and the rewrite must produce byte-identical captures — this is // the old-vs-new parity oracle for the rewrite. // // zig build snap run all snapshots/*.snap, diff goldens // zig build snap -- --update regenerate goldens from this binary // zig build snap -- snapshots/boot.snap one script // // Script commands (line-oriented, # comments): // file create file in the script's cwd (before start) // lines create file with n numbered lines // dirmk create a subdirectory // start [arg] fork the app in a pty (optional extra CLI arg) // wait pump until needle appears on the grid (fails hard) // settle pump for a fixed duration // stable pump until the grid stops changing // text send literal bytes // send send with \e \r \n \t \\ \xNN escapes // key enter esc tab bs space up down left right home end // pgup pgdn c- a- (after esc: settle >=600ms, // or vaxis parses the next byte as alt-) // press|release SGR mouse, 1-based // drag motion with button held // motion button-less motion (hover) // wheel // resize // snap