mirror of
https://github.com/sajari/docconv.git
synced 2026-10-16 21:21:59 +08:00
21 lines
358 B
Go
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)
|
|
}
|
|
}
|