(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestToTextList(t *testing.T) { |
| 30 | got := ToText("<ul><li>one</li><li>two</li></ul>") |
| 31 | if !strings.Contains(got, "• one") { |
| 32 | t.Errorf("ToText list = %q, should contain bullet items", got) |
| 33 | } |
| 34 | if !strings.Contains(got, "• two") { |
| 35 | t.Errorf("ToText list = %q, should contain second bullet", got) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func TestToTextStripsEntities(t *testing.T) { |
| 40 | got := ToText("& < >") |