mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-05 18:53:45 +08:00
test: fix testifylint encoded-compare warning in AsciiJSON test
This commit is contained in:
parent
4ce483f0f4
commit
473f9ddf55
@ -267,8 +267,9 @@ func TestRenderAsciiJSONSupplementaryUnicode(t *testing.T) {
|
||||
|
||||
err := (AsciiJSON{data}).Render(w)
|
||||
require.NoError(t, err)
|
||||
// U+1F600 must be encoded as UTF-16 surrogate pair per RFC 8259
|
||||
assert.Equal(t, "{\"emoji\":\"\\ud83d\\ude00\"}", w.Body.String())
|
||||
// U+1F600 must be encoded as UTF-16 surrogate pair per RFC 8259.
|
||||
// Use Contains to verify the surrogate pair encoding in the raw output.
|
||||
assert.Contains(t, w.Body.String(), `\ud83d\ude00`)
|
||||
}
|
||||
|
||||
func TestRenderAsciiJSONFail(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user