Files
docconv/docconv_test.go
T
2017-09-20 17:44:05 +10:00

21 lines
358 B
Go

package docconv
import (
"strings"
"testing"
)
func TestConvertTrimsSpace(t *testing.T) {
resp, err := Convert(
strings.NewReader(" \n\n\nthe \n file\n\n"),
"text/plain",
false,
)
if err != nil {
t.Fatalf("got error = %v, want nil", err)
}
if want := "the \n file"; resp.Body != want {
t.Errorf("body = %v, want %v", resp.Body, want)
}
}