diff options
author | TheFox0x7 <thefox0x7@gmail.com> | 2025-03-31 07:53:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-31 01:53:48 -0400 |
commit | 0fde8ecd55e3b98d873a0117024fbbeb05d381cb (patch) | |
tree | 2cb84e5aa8d3a8b58cdaeacff054f40e655d26ea /services/gitdiff | |
parent | 0fd5392087d35ebe2268f32de422342020e573b9 (diff) | |
download | gitea-main.tar.gz gitea-main.zip |
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.go | 6 |
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)) |