(t *testing.T)
| 75 | } |
| 76 | |
| 77 | func TestAreaPrinter_GetContent(t *testing.T) { |
| 78 | originalStdout := os.Stdout |
| 79 | os.Stdout = os.NewFile(0, os.DevNull) // Set os.Stdout to DevNull to hide output from cursor.Area |
| 80 | |
| 81 | a, _ := pterm.DefaultArea.Start() |
| 82 | |
| 83 | for _, printable := range printables { |
| 84 | a.Update(printable) |
| 85 | testza.AssertEqual(t, a.GetContent(), pterm.Sprint(printable)) |
| 86 | } |
| 87 | |
| 88 | a.Stop() |
| 89 | |
| 90 | os.Stdout = originalStdout // Restore original os.Stdout |
| 91 | } |
| 92 | |
| 93 | func TestAreaPrinter_WithRemoveWhenDone(t *testing.T) { |
| 94 | originalStdout := os.Stdout |
nothing calls this directly
no test coverage detected
searching dependent graphs…