package internal import ( "strings" "testing" "github.com/andreyvit/diff" ) const baseText = `
` const pageText = ` This is a title

Title

Body text

` const mergeText = ` This is a title

Title

Body text

` 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)) } }