(t *testing.T)
| 3256 | } |
| 3257 | |
| 3258 | func TestStringMapFlagValueFromCommand(t *testing.T) { |
| 3259 | f := &StringMapFlag{Name: "myflag"} |
| 3260 | cmd := &Command{ |
| 3261 | Flags: []Flag{ |
| 3262 | f, |
| 3263 | }, |
| 3264 | } |
| 3265 | assert.NoError(t, cmd.Run(buildTestContext(t), []string{""})) |
| 3266 | require.NoError(t, cmd.Set("myflag", "a=b")) |
| 3267 | require.NoError(t, cmd.Set("myflag", "c=")) |
| 3268 | |
| 3269 | require.Equal(t, map[string]string{"a": "b", "c": ""}, cmd.StringMap(f.Name)) |
| 3270 | } |
| 3271 | |
| 3272 | func TestStringMapFlagApply_Error(t *testing.T) { |
| 3273 | fl := StringMapFlag{Name: "goat"} |
nothing calls this directly
no test coverage detected