Skip to content

Commit 6555c3d

Browse files
authored
Merge pull request #5 from TheBookPeople/test-coverage
Add more tests
2 parents a2eb234 + f19e256 commit 6555c3d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

html2text_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ func TestHTML2Text(t *testing.T) {
3434
ShouldEqual, "would you pay in ¢, £, ¥ or €?")
3535
So(HTML2Text(`Tom & Jerry is not an entity`), ShouldEqual, "Tom & Jerry is not an entity")
3636
So(HTML2Text(`this &neither; as you see`), ShouldEqual, "this &neither; as you see")
37+
So(HTML2Text(`fish & chips`), ShouldEqual, "fish & chips")
38+
So(HTML2Text(`"I'm sorry, Dave. I'm afraid I can't do that." – HAL, 2001: A Space Odyssey`), ShouldEqual, "\"I'm sorry, Dave. I'm afraid I can't do that.\" – HAL, 2001: A Space Odyssey")
39+
So(HTML2Text(`Google ®`), ShouldEqual, "Google ®")
40+
})
41+
42+
Convey("Large Entity", func() {
43+
So(HTMLEntitiesToText("&abcdefghij;"), ShouldEqual, "&abcdefghij;")
3744
})
3845

3946
Convey("Full HTML structure", func() {

0 commit comments

Comments
 (0)