Test \b and \f JSON encoding explicitly

This commit is contained in:
Kai A. Hiller 2024-02-14 21:15:12 +01:00
parent b622071bec
commit 0f87896dc3
1 changed files with 1 additions and 0 deletions

View File

@ -2578,6 +2578,7 @@ func TestJSONString(t *testing.T) {
testJSONString(t, s) testJSONString(t, s)
testJSONString(t, "R\xfd\xfc\a!\x82eO\x16?_\x0f\x9ab\x1dr") testJSONString(t, "R\xfd\xfc\a!\x82eO\x16?_\x0f\x9ab\x1dr")
testJSONString(t, "_\xb9\v\xad\xb3|X!\xb6\xd9U&\xa4\x1a\x95\x04") testJSONString(t, "_\xb9\v\xad\xb3|X!\xb6\xd9U&\xa4\x1a\x95\x04")
testJSONString(t, "\b\f")
rng := rand.New(rand.NewSource(time.Now().UnixNano())) rng := rand.New(rand.NewSource(time.Now().UnixNano()))
start := time.Now() start := time.Now()
var buf [16]byte var buf [16]byte