(t *testing.T)
| 1691 | } |
| 1692 | |
| 1693 | func TestGenericFlagValueFromCommand(t *testing.T) { |
| 1694 | cmd := &Command{ |
| 1695 | Name: "foo", |
| 1696 | Flags: []Flag{ |
| 1697 | &GenericFlag{Name: "myflag", Value: &Parser{}}, |
| 1698 | }, |
| 1699 | } |
| 1700 | |
| 1701 | assert.NoError(t, cmd.Run(buildTestContext(t), []string{"foo", "--myflag", "abc,def"})) |
| 1702 | assert.Equal(t, &Parser{"abc", "def"}, cmd.Generic("myflag")) |
| 1703 | assert.Nil(t, cmd.Generic("someother")) |
| 1704 | } |
| 1705 | |
| 1706 | func TestParseGenericFromEnv(t *testing.T) { |
| 1707 | t.Setenv("APP_SERVE", "20,30") |
nothing calls this directly
no test coverage detected