package internal
import (
"strings"
"testing"
"github.com/andreyvit/diff"
)
const baseText = `
`
const pageText = `
This is a title
Body text
`
const mergeText = `
This is a title
`
func TestMerge(t *testing.T) {
got, _, err := Merge(strings.NewReader(baseText), strings.NewReader(pageText))
if err != nil {
t.Error(err)
return
}
if got != mergeText {
//fmt.Println(got)
//t.Errorf("merge mismatch (-want, +got):\n%s", cmp.Diff(mergeText, got))
t.Errorf("merge mismatch (-want, +got):\n%s", diff.LineDiff(mergeText, got))
}
}