Skip to content

Commit 5b0adf2

Browse files
committed
updating highlightdiff_test.go test data
1 parent 9a59d9a commit 5b0adf2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

services/gitdiff/highlightdiff_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func TestDiffWithHighlight(t *testing.T) {
1818
" run(db)\n",
1919
)
2020

21-
expected := ` run(<span class="removed-code">'<>'</span>)
22-
`
21+
expected := "\t\trun(<span class=\"removed-code\">'<>'</></span>)\n"
22+
2323
output := diffToHTML(nil, diffs, DiffLineDel)
2424
assert.Equal(t, expected, output)
2525

@@ -75,14 +75,14 @@ func TestDiffWithHighlightPlaceholderExhausted(t *testing.T) {
7575
hcd = newHighlightCodeDiff()
7676
hcd.placeholderMaxCount = 0
7777
diffs = hcd.diffWithHighlight(
78-
"a < b",
79-
"a > b",
78+
"a this_is_not_html_at_this_point b",
79+
"a this_is_is_still_not_html_at_this_point_its_just_a_string b",
8080
)
8181
output = diffToHTML(nil, diffs, DiffLineDel)
82-
expected = `a <span class="removed-code"><</span> b`
82+
expected = "a this_is_not_html_at_this_point b"
8383
assert.Equal(t, expected, output)
8484

8585
output = diffToHTML(nil, diffs, DiffLineAdd)
86-
expected = `a <span class="added-code">></span> b`
86+
expected = "a this_is_<span class=\"added-code\">is_still_</span>not_html_at_this_point<span class=\"added-code\">_its_just_a_string</span> b"
8787
assert.Equal(t, expected, output)
8888
}

0 commit comments

Comments
 (0)