testSprintlnContains can be used to test Sprintln methods.
(t *testing.T, logic func(a any) string)
| 163 | |
| 164 | // testSprintlnContains can be used to test Sprintln methods. |
| 165 | func testSprintlnContains(t *testing.T, logic func(a any) string) { |
| 166 | for _, printable := range printables { |
| 167 | t.Run(fmt.Sprint(printable), func(t *testing.T) { |
| 168 | testSprintContains(t, logic) |
| 169 | }) |
| 170 | pterm.DisableStyling() |
| 171 | t.Run(fmt.Sprint(printable), func(t *testing.T) { |
| 172 | testSprintContains(t, logic) |
| 173 | }) |
| 174 | pterm.EnableStyling() |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | // testDoesOutput can be used to test if something is outputted to stdout. |
| 179 | func testDoesOutput(t *testing.T, logic func(w io.Writer)) { |
no test coverage detected
searching dependent graphs…