1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-16 15:14:24 +00:00

Merge pull request #2370 from andreynering/fix-tests

Fix test case after 86bce4a2ae.
This commit is contained in:
Unknwon 2016-01-10 13:19:24 +08:00
commit e2f0587ca3

View File

@ -18,15 +18,15 @@ func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) {
} }
} }
func TestDiffToHtml(t *testing.T) { func TestDiffToHTML(t *testing.T) {
assertEqual(t, "foo <span class=\"added-code\">bar</span> biz", diffToHtml([]dmp.Diff{ assertEqual(t, "foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "}, dmp.Diff{dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffInsert, "bar"}, dmp.Diff{dmp.DiffInsert, "bar"},
dmp.Diff{dmp.DiffDelete, " baz"}, dmp.Diff{dmp.DiffDelete, " baz"},
dmp.Diff{dmp.DiffEqual, " biz"}, dmp.Diff{dmp.DiffEqual, " biz"},
}, DIFF_LINE_ADD)) }, DIFF_LINE_ADD))
assertEqual(t, "foo <span class=\"removed-code\">bar</span> biz", diffToHtml([]dmp.Diff{ assertEqual(t, "foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "}, dmp.Diff{dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffDelete, "bar"}, dmp.Diff{dmp.DiffDelete, "bar"},
dmp.Diff{dmp.DiffInsert, " baz"}, dmp.Diff{dmp.DiffInsert, " baz"},