Commit b698d850a1
Verified · cmc ci/build: success ci/test: success
e2e/readonly_test.go +9 −4
| @@ -176,11 +176,10 @@ func TestReadOnlyCommandsWriteNothing(t *testing.T) { | ||
| 176 | 176 | "repo download": true, |
| 177 | 177 | "account export": true, |
| 178 | 178 | "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 | |
| 180 | 180 | "admin stats": true, // until the view layout (Part 3) |
| 181 | 181 | "repo deps status": true, // until the view layout (Part 3) |
| 182 | 182 | "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 | |
| 184 | 183 | } |
| 185 | 184 | // binaryOutput's bytes are not text: a stray 0x1b is coincidence, not |
| 186 | 185 | // an SGR sequence escaping into plain output. |
| @@ -216,11 +215,17 @@ func TestReadOnlyCommandsWriteNothing(t *testing.T) { | ||
| 216 | 215 | before = after |
| 217 | 216 | |
| 218 | 217 | 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 | } | |
| 220 | 222 | if !binaryOutput[path] && strings.Contains(plainOut, "\x1b") { |
| 221 | 223 | t.Errorf("%s: SGR bytes in plain output", path) |
| 222 | 224 | } |
| 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 | } | |
| 224 | 229 | if !rawOutput[path] { |
| 225 | 230 | for _, line := range strings.Split(termOut, "\n") { |
| 226 | 231 | if w := displayCells(stripSGRe2e(line)); w > 60 { |