(t *testing.T)
| 126 | } |
| 127 | }) |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | func TestToTextImgTag(t *testing.T) { |
| 132 | got := ToText(`<p>Before</p><img src="test.png" alt="photo"><p>After</p>`) |
| 133 | if !strings.Contains(got, "[photo]") { |
| 134 | t.Errorf("ToText should render img alt text, got %q", got) |
| 135 | } |
| 136 | if !strings.Contains(got, "Before") || !strings.Contains(got, "After") { |
| 137 | t.Errorf("ToText should include surrounding text, got %q", got) |
| 138 | } |
| 139 | } |
| 140 |
nothing calls this directly
no test coverage detected