mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-31 03:14:17 +09:00
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
18 lines
394 B
Go
18 lines
394 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package repo
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDiffContentHistory(t *testing.T) {
|
|
out := diffContentHistory("<\r\n&\r\n>", "<\nXXX\n>")
|
|
assert.Equal(t, `<pre class="chroma"><
|
|
<span class="gd">&</span><span class="gi">XXX</span>
|
|
></pre>`, string(out))
|
|
}
|