(t *testing.T)
| 146 | } |
| 147 | |
| 148 | func TestText_MultiSelection(t *testing.T) { |
| 149 | doc, err := NewDocumentFromReader(strings.NewReader(textNodes)) |
| 150 | if err != nil { |
| 151 | t.Fatal(err) |
| 152 | } |
| 153 | |
| 154 | got := Text(doc.Find("h1, p"), &TextOptions{Separator: ",", Trim: true}) |
| 155 | want := "Hello,world" |
| 156 | if got != want { |
| 157 | t.Errorf("want %q, got %q", want, got) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | func TestText_EmptySelection(t *testing.T) { |
| 162 | doc, err := NewDocumentFromReader(strings.NewReader(textNodes)) |
nothing calls this directly
no test coverage detected