(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestCenterPrinterPrintMethodsCenterSeparately(t *testing.T) { |
| 103 | p := pterm.DefaultCenter.WithCenterEachLineSeparately() |
| 104 | |
| 105 | t.Run("Print", func(t *testing.T) { |
| 106 | testPrintContains(t, func(w io.Writer, a any) { |
| 107 | p.Print(a) |
| 108 | }) |
| 109 | }) |
| 110 | |
| 111 | t.Run("Printf", func(t *testing.T) { |
| 112 | testPrintfContains(t, func(w io.Writer, format string, a any) { |
| 113 | p.Printf(format, a) |
| 114 | }) |
| 115 | }) |
| 116 | |
| 117 | t.Run("Println", func(t *testing.T) { |
| 118 | testPrintlnContains(t, func(w io.Writer, a any) { |
| 119 | p.Println(a) |
| 120 | }) |
| 121 | }) |
| 122 | |
| 123 | t.Run("Sprint", func(t *testing.T) { |
| 124 | testSprintContains(t, func(a any) string { |
| 125 | return p.Sprint(a) |
| 126 | }) |
| 127 | }) |
| 128 | |
| 129 | t.Run("Sprintf", func(t *testing.T) { |
| 130 | testSprintfContains(t, func(format string, a any) string { |
| 131 | return p.Sprintf(format, a) |
| 132 | }) |
| 133 | }) |
| 134 | |
| 135 | t.Run("Sprintln", func(t *testing.T) { |
| 136 | testSprintlnContains(t, func(a any) string { |
| 137 | return p.Sprintln(a) |
| 138 | }) |
| 139 | }) |
| 140 | } |
| 141 | |
| 142 | func TestCenterPrinter_SprintLineLongerThanTerminal(t *testing.T) { |
| 143 | p := pterm.DefaultCenter |
nothing calls this directly
no test coverage detected
searching dependent graphs…