TestRemoveDuplicateEmptyLines 测试移除重复空行
(t *testing.T)
| 337 | |
| 338 | // TestRemoveDuplicateEmptyLines 测试移除重复空行 |
| 339 | func TestRemoveDuplicateEmptyLines(t *testing.T) { |
| 340 | svc := NewDefaultCompressionService(nil, 100) |
| 341 | |
| 342 | input := "Line 1\n\n\n\nLine 2\n\n\nLine 3" |
| 343 | expected := "Line 1\n\nLine 2\n\nLine 3" |
| 344 | |
| 345 | result := svc.removeDuplicateEmptyLines(input) |
| 346 | if result != expected { |
| 347 | t.Errorf("Expected %q, got %q", expected, result) |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | // TestCompactFormat 测试紧凑格式 |
| 352 | func TestCompactFormat(t *testing.T) { |
nothing calls this directly
no test coverage detected