aboutsummaryrefslogtreecommitdiffstats
path: root/services/gitdiff
diff options
context:
space:
mode:
authorTheFox0x7 <thefox0x7@gmail.com>2025-03-31 07:53:48 +0200
committerGitHub <noreply@github.com>2025-03-31 01:53:48 -0400
commit0fde8ecd55e3b98d873a0117024fbbeb05d381cb (patch)
tree2cb84e5aa8d3a8b58cdaeacff054f40e655d26ea /services/gitdiff
parent0fd5392087d35ebe2268f32de422342020e573b9 (diff)
downloadgitea-main.tar.gz
gitea-main.zip
Enable testifylint rules (#34075)HEADmain
enable testifylint rules disabled in: https://github.com/go-gitea/gitea/pull/34054
Diffstat (limited to 'services/gitdiff')
-rw-r--r--services/gitdiff/highlightdiff_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/gitdiff/highlightdiff_test.go b/services/gitdiff/highlightdiff_test.go
index c2584dc622..aebe38ae7c 100644
--- a/services/gitdiff/highlightdiff_test.go
+++ b/services/gitdiff/highlightdiff_test.go
@@ -38,15 +38,15 @@ func TestDiffWithHighlight(t *testing.T) {
hcd.placeholderTokenMap['O'], hcd.placeholderTokenMap['C'] = "<span>", "</span>"
assert.Equal(t, "<span></span>", string(hcd.recoverOneDiff("OC")))
assert.Equal(t, "<span></span>", string(hcd.recoverOneDiff("O")))
- assert.Equal(t, "", string(hcd.recoverOneDiff("C")))
+ assert.Empty(t, string(hcd.recoverOneDiff("C")))
})
}
func TestDiffWithHighlightPlaceholder(t *testing.T) {
hcd := newHighlightCodeDiff()
output := hcd.diffLineWithHighlight(DiffLineDel, "a='\U00100000'", "a='\U0010FFFD''")
- assert.Equal(t, "", hcd.placeholderTokenMap[0x00100000])
- assert.Equal(t, "", hcd.placeholderTokenMap[0x0010FFFD])
+ assert.Empty(t, hcd.placeholderTokenMap[0x00100000])
+ assert.Empty(t, hcd.placeholderTokenMap[0x0010FFFD])
expected := fmt.Sprintf(`a='<span class="removed-code">%s</span>'`, "\U00100000")
assert.Equal(t, expected, string(output))