MCPcopy Create free account
hub / github.com/github/gh-aw / TestNormalizeWhitespace_PreservesContent

Function TestNormalizeWhitespace_PreservesContent

pkg/stringutil/stringutil_test.go:275–282  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

273}
274
275func TestNormalizeWhitespace_PreservesContent(t *testing.T) {
276 // Ensure that non-trailing whitespace is preserved
277 content := "line1 middle spaces\nline2\t\tmiddle\t\ttabs\n"
278 result := NormalizeWhitespace(content)
279
280 assert.Contains(t, result, "middle spaces", "NormalizeWhitespace should preserve non-trailing spaces inside lines")
281 assert.Contains(t, result, "middle\t\ttabs", "NormalizeWhitespace should preserve non-trailing tabs inside lines")
282}
283
284func BenchmarkTruncate_Short(b *testing.B) {
285 s := "short"

Callers

nothing calls this directly

Calls 1

NormalizeWhitespaceFunction · 0.85

Tested by

no test coverage detected