diff --git a/hatmill_test.go b/hatmill_test.go index 15b4805..3475929 100644 --- a/hatmill_test.go +++ b/hatmill_test.go @@ -178,6 +178,21 @@ func TestParentElement(t *testing.T) { properties.TestingRun(t) } +func TestTerms(t *testing.T) { + properties := gopter.NewProperties(nil) + + properties.Property("WriteTo writes the concatenation of calling WriteTo on the slice contents", prop.ForAll( + func(terms []hatmill.Term) bool { + var expected string + for _, term := range terms { + expected += string(term.(hatmill.Text)) + } + return checkWrite(hatmill.Terms(terms), expected) + }, + gen.SliceOf(htmlTextGen), + )) +} + func Example() { userInput := ""