(t *testing.T)
| 138 | } |
| 139 | |
| 140 | func TestNewTextSourceWithLimit_Exceeded(t *testing.T) { |
| 141 | _, err := NewTextSourceWithLimit("greetings", 5) |
| 142 | if err == nil { |
| 143 | t.Fatalf("expected size limit error, got nil") |
| 144 | } |
| 145 | if !strings.Contains(err.Error(), "size exceeds limit") { |
| 146 | t.Fatalf("unexpected error: %v", err) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | func TestNewTextSourceWithLimit_MultibyteWithinLimit(t *testing.T) { |
| 151 | data := "🙂🙂" |
nothing calls this directly
no test coverage detected