"bytes"
"errors"
"fmt"
+ "github.com/stretchr/testify/assert"
"html/template"
"reflect"
"testing"
}
}
+func TestTrim(t *testing.T) {
+ v, _ := Trim("1234 my way 13", "123")
+ assert.Equal(t, "4 my way ", v)
+ v, _ = Trim(" my way ", " ")
+ v, _ = Trim(1234, "14")
+ assert.Equal(t, "23", v)
+ _, e := Trim(tstNoStringer{}, " ")
+ assert.NotNil(t, e, "tstNoStringer isn't trimmable")
+}
+
func TestSafeHtml(t *testing.T) {
for i, this := range []struct {
str string