MCPcopy
hub / github.com/urfave/cli / TestHasFlags

Function TestHasFlags

flag_test.go:3359–3368  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3357}
3358
3359func TestHasFlags(t *testing.T) {
3360 flagToCheck := &StringFlag{Name: "foo"}
3361 flags := []Flag{
3362 &StringFlag{Name: "bar"},
3363 &Int64Flag{Name: "baz"},
3364 flagToCheck,
3365 }
3366
3367 assert.True(t, hasFlag(flags, flagToCheck))
3368}
3369
3370func TestFlagsByName(t *testing.T) {
3371 flags := []Flag{

Callers

nothing calls this directly

Calls 1

hasFlagFunction · 0.85

Tested by

no test coverage detected