@@ -34,14 +34,6 @@ func TestDiffWithHighlight(t *testing.T) {
3434 hcd .placeholderTokenMap ['C' ] = "</span>"
3535 diff := diffmatchpatch.Diff {}
3636
37- // diff.Text = "OC"
38- // hcd.recoverOneDiff(&diff)
39- // assert.Equal(t, "<span></span>", diff.Text)
40- //
41- // diff.Text = "O"
42- // hcd.recoverOneDiff(&diff)
43- // assert.Equal(t, "<span></span>", diff.Text)
44-
4537 diff .Text = "C"
4638 hcd .recoverOneDiff (& diff )
4739 assert .Equal (t , "" , diff .Text )
@@ -100,29 +92,3 @@ func TestDiffWithHighlightPlaceholderExhausted(t *testing.T) {
10092 assert .Equal (t , expected , output )
10193}
10294
103- func TestDiffWithHighlightTagMatch (t * testing.T ) {
104- // totalOverflow := 0
105- //
106- // for i := 0; i < 100; i++ {
107- // hcd := newHighlightCodeDiff()
108- // hcd.placeholderMaxCount = i
109- // diffs := hcd.diffWithHighlight(
110- // "main.js", "",
111- // "a='1'",
112- // "b='2'",
113- // )
114- // totalOverflow += hcd.placeholderOverflowCount
115- //
116- // output := diffToHTML(nil, diffs, DiffLineDel)
117- // c1 := strings.Count(output, "<span")
118- // c2 := strings.Count(output, "</span")
119- // assert.Equal(t, c1, c2)
120- //
121- // output = diffToHTML(nil, diffs, DiffLineAdd)
122- // c1 = strings.Count(output, "<span")
123- // c2 = strings.Count(output, "</span")
124- // assert.Equal(t, c1, c2)
125- // }
126- //
127- // assert.NotZero(t, totalOverflow)
128- }
0 commit comments