Debian Codegraph @

debian/patches/0002-Skip-inconsistent-tests-for-Go1.23.patch

raw symbols SCIP
1 From: Shengjing Zhu <[email protected]>
2 Date: Wed, 14 Aug 2024 19:27:26 +0800
3 Subject: Skip inconsistent tests for Go1.23
4
5 ---
6 interp/interp_consistent_test.go | 8 +++++++-
7 1 file changed, 7 insertions(+), 1 deletion(-)
8
9 diff --git a/interp/interp_consistent_test.go b/interp/interp_consistent_test.go
10 index 870997d..8aadd21 100644
11 --- a/interp/interp_consistent_test.go
12 +++ b/interp/interp_consistent_test.go
13 @@ -23,6 +23,8 @@ var testsToSkipGo122 = map[string]bool{"closure9.go": true, "closure10.go": true
14
15 var go122 = strings.HasPrefix(runtime.Version(), "go1.22")
16
17 +var go123 = strings.HasPrefix(runtime.Version(), "go1.23")
18 +
19 func TestInterpConsistencyBuild(t *testing.T) {
20 if testing.Short() {
21 t.Skip("short mode")
22 @@ -134,7 +136,7 @@ func TestInterpConsistencyBuild(t *testing.T) {
23 if go121 && testsToSkipGo121[file.Name()] {
24 continue
25 }
26 - if go122 && testsToSkipGo122[file.Name()] {
27 + if (go122 || go123) && testsToSkipGo122[file.Name()] {
28 continue
29 }
30
31 @@ -317,6 +319,10 @@ func TestInterpErrorConsistency(t *testing.T) {
32
33 for _, test := range testCases {
34 t.Run(test.fileName, func(t *testing.T) {
35 + if go123 && test.fileName == "switch13.go" {
36 + t.Skip()
37 + }
38 +
39 if test.expectedInterp == "" && test.expectedExec == "" {
40 t.Fatal("at least expectedInterp must be defined")
41 }