Commit b698d850a1

b698d850a12e8480bbcc0b5f30d072c96f56b6e2

parent: 522169051e

Verified · cmc ci/build: success ci/test: success

cmc <hello@cleberg.net> · 2026-09-24 02:09 UTC

e2e: terminal and plain runs must succeed

Ref #254
e2e/readonly_test.go +9 −4
@@ -176,11 +176,10 @@ func TestReadOnlyCommandsWriteNothing(t *testing.T) {
176176 "repo download": true,
177177 "account export": true,
178178 "admin user show": true, // until the view layout (Part 3)
179 "admin runners": true, // until the view layout (Part 3)
179 "admin runners": true, // until the view layout (Part 3): the queue summary line
180180 "admin stats": true, // until the view layout (Part 3)
181181 "repo deps status": true, // until the view layout (Part 3)
182182 "release show": true, // until the view layout (Part 3)
183 "mr revisions": true, // single-revision hint is free text, not a table row that can be shrunk
184183 }
185184 // binaryOutput's bytes are not text: a stray 0x1b is coincidence, not
186185 // an SGR sequence escaping into plain output.
@@ -216,11 +215,17 @@ func TestReadOnlyCommandsWriteNothing(t *testing.T) {
216215 before = after
217216
218217 argv := append(append([]string{}, cmd.Path...), args...)
219 plainOut, _, _ := inst.sshTerm(t, aliceKey, "", argv...)
218 plainOut, plainErrOut, plainCode := inst.sshTerm(t, aliceKey, "", argv...)
219 if plainCode != 0 && !(plainCode == 3 && notFoundOK[path]) {
220 t.Errorf("%s: --term= plain exit %d: %s", path, plainCode, strings.TrimSpace(plainErrOut))
221 }
220222 if !binaryOutput[path] && strings.Contains(plainOut, "\x1b") {
221223 t.Errorf("%s: SGR bytes in plain output", path)
222224 }
223 termOut, _, _ := inst.sshTerm(t, aliceKey, "60,color", argv...)
225 termOut, termErrOut, termCode := inst.sshTerm(t, aliceKey, "60,color", argv...)
226 if termCode != 0 && !(termCode == 3 && notFoundOK[path]) {
227 t.Errorf("%s: --term=60,color exit %d: %s", path, termCode, strings.TrimSpace(termErrOut))
228 }
224229 if !rawOutput[path] {
225230 for _, line := range strings.Split(termOut, "\n") {
226231 if w := displayCells(stripSGRe2e(line)); w > 60 {