(t *testing.T)
| 639 | } |
| 640 | |
| 641 | func TestPRView_tty_wrappedLink(t *testing.T) { |
| 642 | t.Setenv("GLAMOUR_STYLE", "notty") |
| 643 | |
| 644 | ios, _, stdout, stderr := iostreams.Test() |
| 645 | ios.SetStdoutTTY(true) |
| 646 | |
| 647 | now := time.Date(2026, time.January, 1, 0, 0, 0, 0, time.UTC) |
| 648 | pr := &api.PullRequest{ |
| 649 | Number: 123, |
| 650 | CreatedAt: now, |
| 651 | Body: "https://user-images.githubusercontent.com/1532486/119571265-fe41be00-bd65-11eb-8c99-a3eaec2a9b1c.png", |
| 652 | } |
| 653 | opts := &ViewOptions{ |
| 654 | IO: ios, |
| 655 | Finder: shared.NewMockFinder("123", pr, ghrepo.New("OWNER", "REPO")), |
| 656 | SelectorArg: "123", |
| 657 | Now: func() time.Time { return now }, |
| 658 | } |
| 659 | |
| 660 | require.NoError(t, viewRun(opts)) |
| 661 | assert.Empty(t, stderr.String()) |
| 662 | assert.Contains(t, stdout.String(), |
| 663 | "\x1b]8;id=105816246;https://user-images.githubusercontent.com/1532486/119571265-fe41be00-bd65-11eb-8c99-a3eaec2a9b1c.png\ahttps://user-images.githubusercontent.com/1532486/119571265-fe41be00-bd65-\x1b]8;;\a \n"+ |
| 664 | " \x1b]8;id=105816246;https://user-images.githubusercontent.com/1532486/119571265-fe41be00-bd65-11eb-8c99-a3eaec2a9b1c.png\a11eb-8c99-a3eaec2a9b1c.png\x1b]8;;\a") |
| 665 | } |
| 666 | |
| 667 | func TestPRView_eventListenHint(t *testing.T) { |
| 668 | const hint = "hint: if you need to wait for this pull request to be reviewed, merged, or closed before continuing, use this instead of polling:\n" + |
nothing calls this directly
no test coverage detected