Debian Codegraph @

debian/patches/0001-Skip-test-for-encoding-b-and-f.patch

raw
1 From: Shengjing Zhu <[email protected]>
2 Date: Thu, 29 Feb 2024 17:30:41 +0800
3 Subject: Skip test for encoding \b and \f
4
5 Go 1.22 changes encoding behavior.
6 ---
7 api_tests/encoder_18_test.go | 2 +-
8 value_tests/string_test.go | 4 ++++
9 2 files changed, 5 insertions(+), 1 deletion(-)
10
11 diff --git a/api_tests/encoder_18_test.go b/api_tests/encoder_18_test.go
12 index 3c159b5..acb34b8 100644
13 --- a/api_tests/encoder_18_test.go
14 +++ b/api_tests/encoder_18_test.go
15 @@ -1,4 +1,4 @@
16 -//+build go1.8
17 +//+build go1.8,!go1.22
18
19 package test
20
21 diff --git a/value_tests/string_test.go b/value_tests/string_test.go
22 index 5f34f9d..cc93d06 100644
23 --- a/value_tests/string_test.go
24 +++ b/value_tests/string_test.go
25 @@ -14,6 +14,10 @@ func init() {
26 "he\u2029\u2028he",
27 )
28 for i := 0; i < utf8.RuneSelf; i++ {
29 + if i == '\b' || i == '\f' {
30 + // https://github.com/golang/go/issues/64346
31 + continue
32 + }
33 marshalCases = append(marshalCases, string([]byte{byte(i)}))
34 }
35 }