MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / TestTruncateText_Short

Function TestTruncateText_Short

utils_test.go:106–112  ·  view source on GitHub ↗

======================================== Text Truncation Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

104// ========================================
105
106func TestTruncateText_Short(t *testing.T) {
107 text := "Short"
108 result := truncateText(text, 25)
109 if result != text {
110 t.Errorf("Short text should not be truncated: got '%s', want '%s'", result, text)
111 }
112}
113
114func TestTruncateText_Long(t *testing.T) {
115 text := "This is a very long text that needs to be truncated"

Callers

nothing calls this directly

Calls 1

truncateTextFunction · 0.85

Tested by

no test coverage detected