Debian Codegraph @

debian/patches/0002-Fix-tests-failing-on-32-bit-architectures.patch

raw symbols SCIP
1 Fromscip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/patches/`0002-Fix-tests-failing-on-32-bit-architectures.patch`#From.: Reinhard Tartler <[email protected]scip-debian . . . identity/`[email protected]`.>
2 Datescip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/patches/`0002-Fix-tests-failing-on-32-bit-architectures.patch`#Date.: Tue, 13 Aug 2024 06:34:53 -0400
3 Subjectscip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/patches/`0002-Fix-tests-failing-on-32-bit-architectures.patch`#Subject.: Fix tests failing on 32 bit architectures
4
5 Bugs-Upstream: https://github.com/urfave/cli/issues/1962
6 Forwarded: https://github.com/urfave/cli/pull/1963
7 ---
8 altsrc/yaml_file_loader_test.go | 25 ++++++++++++-------------
9 flag_test.go | 10 +++++-----
10 2 files changed, 17 insertions(+), 18 deletions(-)
11
12 diff --git a/altsrc/yaml_file_loader_test.goscip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/upstream/`altsrc/yaml_file_loader_test.go`: b/altsrc/yaml_file_loader_test.goscip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/upstream/`altsrc/yaml_file_loader_test.go`:
13 index ce69189..d8a1db9 100644
14 --- a/altsrc/yaml_file_loader_test.go
15 +++ b/altsrc/yaml_file_loader_test.go
16 @@ -3,7 +3,6 @@ package altsrc_test
17 import (
18 "errors"
19 "fmt"
20 - "io/ioutil"
21 "log"
22 "os"
23 "testing"
24 @@ -90,7 +89,7 @@ func ExampleApp_Run_yamlFileLoaderDuration() {
25 }
26
27 func TestYamlFileInt64Slice(t *testing.T) {
28 - _ = ioutil.WriteFile("current.yaml", []byte(`top:
29 + _ = os.WriteFile("current.yaml", []byte(`top:
30 test: [100, 9223372036854775808]`), 0666)
31 defer os.Remove("current.yaml")
32
33 @@ -110,7 +109,7 @@ func TestYamlFileInt64Slice(t *testing.T) {
34 }
35
36 func TestYamlFileStringSlice(t *testing.T) {
37 - _ = ioutil.WriteFile("current.yaml", []byte(`top:
38 + _ = os.WriteFile("current.yaml", []byte(`top:
39 test: ["s1", "s2"]`), 0666)
40 defer os.Remove("current.yaml")
41
42 @@ -143,7 +142,7 @@ func TestYamlFileUint64(t *testing.T) {
43 }{
44 {
45 "top.test",
46 - `top:
47 + `top:
48 test: 100`,
49 false,
50 },
51 @@ -169,7 +168,7 @@ func TestYamlFileUint64(t *testing.T) {
52 },
53 {
54 "test",
55 - "test: 9223372036854775808", //uintt64
56 + "test: 9223372036854775808", //uint64
57 false,
58 },
59 {
60 @@ -180,7 +179,7 @@ func TestYamlFileUint64(t *testing.T) {
61 }
62
63 for i, test := range tests {
64 - _ = ioutil.WriteFile("current.yaml", []byte(test.entry), 0666)
65 + _ = os.WriteFile("current.yaml", []byte(test.entry), 0666)
66 defer os.Remove("current.yaml")
67
68 testFlag := []cli.Flag{
69 @@ -207,7 +206,7 @@ func TestYamlFileUint(t *testing.T) {
70 }{
71 {
72 "top.test",
73 - `top:
74 + `top:
75 test: 100`,
76 false,
77 },
78 @@ -228,12 +227,12 @@ func TestYamlFileUint(t *testing.T) {
79 },
80 {
81 "test",
82 - "test: 9223372036854775807", //int
83 + "test: 775807", //int
84 false,
85 },
86 {
87 "test",
88 - "test: 9223372036854775808", //uintt64
89 + "test: 4775808", //uint64
90 false,
91 },
92 {
93 @@ -244,7 +243,7 @@ func TestYamlFileUint(t *testing.T) {
94 }
95
96 for i, test := range tests {
97 - _ = ioutil.WriteFile("current.yaml", []byte(test.entry), 0666)
98 + _ = os.WriteFile("current.yaml", []byte(test.entry), 0666)
99 defer os.Remove("current.yaml")
100
101 testFlag := []cli.Flag{
102 @@ -271,7 +270,7 @@ func TestYamlFileInt64(t *testing.T) {
103 }{
104 {
105 "top.test",
106 - `top:
107 + `top:
108 test: 100`,
109 false,
110 },
111 @@ -297,7 +296,7 @@ func TestYamlFileInt64(t *testing.T) {
112 },
113 {
114 "test",
115 - "test: 9223372036854775808", //uintt64
116 + "test: 9223372036854775808", //uint64
117 true,
118 },
119 {
120 @@ -308,7 +307,7 @@ func TestYamlFileInt64(t *testing.T) {
121 }
122
123 for i, test := range tests {
124 - _ = ioutil.WriteFile("current.yaml", []byte(test.entry), 0666)
125 + _ = os.WriteFile("current.yaml", []byte(test.entry), 0666)
126 defer os.Remove("current.yaml")
127
128 testFlag := []cli.Flag{
129 diff --git a/flag_test.goscip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/upstream/`flag_test.go`: b/flag_test.goscip-debian debian golang-github-urfave-cli-v2 2.25.7-5 golang-github-urfave-cli-v2/upstream/`flag_test.go`:
130 index 2e01766..64d9303 100644
131 --- a/flag_test.go
132 +++ b/flag_test.go
133 @@ -196,7 +196,7 @@ func TestFlagsFromEnv(t *testing.T) {
134 {"1", 1, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}}, ""},
135 {"08", 8, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 10}, ""},
136 {"755", 493, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 8}, ""},
137 - {"deadBEEF", 3735928559, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 16}, ""},
138 + {"dBEEF", 900847, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 16}, ""},
139 {"08", 0, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 0}, `could not parse "08" as int value from environment variable "SECONDS" for flag seconds: .*`},
140 {"1.2", 0, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}}, `could not parse "1.2" as int value from environment variable "SECONDS" for flag seconds: .*`},
141 {"foobar", 0, &IntFlag{Name: "seconds", EnvVars: []string{"SECONDS"}}, `could not parse "foobar" as int value from environment variable "SECONDS" for flag seconds: .*`},
142 @@ -230,7 +230,7 @@ func TestFlagsFromEnv(t *testing.T) {
143 {"1", uint(1), &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}}, ""},
144 {"08", uint(8), &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 10}, ""},
145 {"755", uint(493), &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 8}, ""},
146 - {"deadBEEF", uint(3735928559), &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 16}, ""},
147 + {"dBEEF", uint(900847), &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 16}, ""},
148 {"08", 0, &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 0}, `could not parse "08" as uint value from environment variable "SECONDS" for flag seconds: .*`},
149 {"1.2", 0, &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}}, `could not parse "1.2" as uint value from environment variable "SECONDS" for flag seconds: .*`},
150 {"foobar", 0, &UintFlag{Name: "seconds", EnvVars: []string{"SECONDS"}}, `could not parse "foobar" as uint value from environment variable "SECONDS" for flag seconds: .*`},
151 @@ -238,7 +238,7 @@ func TestFlagsFromEnv(t *testing.T) {
152 {"1", uint64(1), &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}}, ""},
153 {"08", uint64(8), &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 10}, ""},
154 {"755", uint64(493), &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 8}, ""},
155 - {"deadBEEF", uint64(3735928559), &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 16}, ""},
156 + {"dBEEF", uint64(900847), &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 16}, ""},
157 {"08", 0, &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}, Base: 0}, `could not parse "08" as uint64 value from environment variable "SECONDS" for flag seconds: .*`},
158 {"1.2", 0, &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}}, `could not parse "1.2" as uint64 value from environment variable "SECONDS" for flag seconds: .*`},
159 {"foobar", 0, &Uint64Flag{Name: "seconds", EnvVars: []string{"SECONDS"}}, `could not parse "foobar" as uint64 value from environment variable "SECONDS" for flag seconds: .*`},
160 @@ -1427,8 +1427,8 @@ var uintSliceFlagTests = []struct {
161 }{
162 {"heads", nil, NewUintSlice(), "--heads value [ --heads value ]\t"},
163 {"H", nil, NewUintSlice(), "-H value [ -H value ]\t"},
164 - {"heads", []string{"H"}, NewUintSlice(uint(2), uint(17179869184)),
165 - "--heads value, -H value [ --heads value, -H value ]\t(default: 2, 17179869184)"},
166 + {"heads", []string{"H"}, NewUintSlice(uint(2), uint(79869184)),
167 + "--heads value, -H value [ --heads value, -H value ]\t(default: 2, 79869184)"},
168 }
169
170 func TestUintSliceFlagHelpOutput(t *testing.T) {