testSprintfContains can be used to test Sprintf methods.
(t *testing.T, logic func(format string, a any) string)
| 135 | |
| 136 | // testSprintfContains can be used to test Sprintf methods. |
| 137 | func testSprintfContains(t *testing.T, logic func(format string, a any) string) { |
| 138 | for _, printable := range printables { |
| 139 | t.Run(fmt.Sprint(printable), func(t *testing.T) { |
| 140 | testza.AssertContains(t, logic("Hello, %v!", printable), fmt.Sprintf("Hello, %v!", printable)) |
| 141 | }) |
| 142 | pterm.DisableStyling() |
| 143 | t.Run(fmt.Sprint(printable), func(t *testing.T) { |
| 144 | testza.AssertContains(t, logic("Hello, %v!", printable), fmt.Sprintf("Hello, %v!", printable)) |
| 145 | }) |
| 146 | pterm.EnableStyling() |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | // testSprintflnContains can be used to test Sprintfln methods. |
| 151 | func testSprintflnContains(t *testing.T, logic func(format string, a any) string) { |
no test coverage detected
searching dependent graphs…