(t *testing.T)
| 255 | } |
| 256 | |
| 257 | func TestRenderSlice_MixedContentInList(t *testing.T) { |
| 258 | var output strings.Builder |
| 259 | // Test with various characters that might need formatting |
| 260 | data := []string{ |
| 261 | "simple", |
| 262 | "with spaces", |
| 263 | "with\nnewline", |
| 264 | "", // empty string |
| 265 | "special-chars!@#", |
| 266 | } |
| 267 | val := reflect.ValueOf(data) |
| 268 | |
| 269 | renderSlice(val, "", &output, 0) |
| 270 | |
| 271 | result := output.String() |
| 272 | |
| 273 | // All items should be in the output |
| 274 | if !strings.Contains(result, "• simple") { |
| 275 | t.Error("Output should contain first item") |
| 276 | } |
| 277 | if !strings.Contains(result, "• with spaces") { |
| 278 | t.Error("Output should contain item with spaces") |
| 279 | } |
| 280 | if !strings.Contains(result, "special-chars!@#") { |
| 281 | t.Error("Output should contain item with special characters") |
| 282 | } |
| 283 | } |
nothing calls this directly
no test coverage detected