MCPcopy Create free account
hub / github.com/astercloud/aster / TestRemoveDuplicateEmptyLines

Function TestRemoveDuplicateEmptyLines

pkg/compression/service_test.go:339–349  ·  view source on GitHub ↗

TestRemoveDuplicateEmptyLines 测试移除重复空行

(t *testing.T)

Source from the content-addressed store, hash-verified

337
338// TestRemoveDuplicateEmptyLines 测试移除重复空行
339func 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 测试紧凑格式
352func TestCompactFormat(t *testing.T) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected