"testing"
 )
 
+type tstNoStringer struct {
+}
+
 func TestGt(t *testing.T) {
        for i, this := range []struct {
                left          interface{}
        }
 }
 
+func TestChomp(t *testing.T) {
+       base := "\n This is\na story "
+       for i, item := range []string{
+               "\n",
+               "\r",
+               "\r\n",
+       } {
+               chomped, _ := Chomp(base + item)
+
+               if chomped != base {
+                       t.Errorf("[%d] Chomp failed, got '%v'", i, chomped)
+               }
+
+               _, err := Chomp(tstNoStringer{})
+
+               if err == nil {
+                       t.Errorf("Chomp should fail")
+               }
+       }
+}
+
 func TestSafeHtml(t *testing.T) {
        for i, this := range []struct {
                str                 string