Commit ee57439e55
Verified · cmc
Layout: unified · split
e2e/term_test.go +5 −5
| @@ -21,11 +21,11 @@ func TestTermEnvSelectsTerminalOutput(t *testing.T) { | ||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | plain, _, _ := inst.sshTerm(t, key, "", "repo", "list") |
| 24 | if strings.Contains(plain, "PATH") || !strings.Contains(plain, "alice/app\t") { | |
| 24 | if strings.Contains(plain, "alice/app ") || !strings.Contains(plain, "alice/app\t") { | |
| 25 | 25 | t.Errorf("plain repo list: %q", plain) |
| 26 | 26 | } |
| 27 | 27 | term, _, _ := inst.sshTerm(t, key, "80,color", "repo", "list") |
| 28 | if !strings.HasPrefix(term, "\x1b[2mPATH") { | |
| 28 | if !strings.HasPrefix(term, "\x1b[2malice/app\x1b[0m ") { | |
| 29 | 29 | t.Errorf("terminal repo list: %q", term) |
| 30 | 30 | } |
| 31 | 31 | } |
| @@ -75,13 +75,13 @@ func TestTermEnvOverMultiplexedSession(t *testing.T) { | ||
| 75 | 75 | exec.Command("ssh", "-o", "ControlPath="+sock, "-O", "exit", "git@127.0.0.1").Run() |
| 76 | 76 | }) |
| 77 | 77 | |
| 78 | if out := mux("80"); !strings.HasPrefix(out, "PATH") { | |
| 78 | if out := mux("80"); !strings.HasPrefix(out, "alice/app ") { | |
| 79 | 79 | t.Fatalf("master session: %q", out) |
| 80 | 80 | } |
| 81 | if out := mux("80,color"); !strings.HasPrefix(out, "\x1b[2mPATH") { | |
| 81 | if out := mux("80,color"); !strings.HasPrefix(out, "\x1b[2malice/app") { | |
| 82 | 82 | t.Errorf("second session kept the master's GITBAY_TERM: %q", out) |
| 83 | 83 | } |
| 84 | if out := mux(""); strings.Contains(out, "PATH") { | |
| 84 | if out := mux(""); !strings.HasPrefix(out, "alice/app\t") { | |
| 85 | 85 | t.Errorf("session without GITBAY_TERM got terminal output: %q", out) |
| 86 | 86 | } |
| 87 | 87 | } |