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

Function TestTimestampFlagValueFromCommand

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

Source from the content-addressed store, hash-verified

2764}
2765
2766func TestTimestampFlagValueFromCommand(t *testing.T) {
2767 now := time.Now()
2768 cmd := &Command{
2769 Flags: []Flag{
2770 &TimestampFlag{
2771 Name: "myflag",
2772 Value: now,
2773 },
2774 },
2775 }
2776 f := &TimestampFlag{Name: "myflag"}
2777 require.Equal(t, now, cmd.Timestamp(f.Name))
2778}
2779
2780type flagDefaultTestCase struct {
2781 name string

Callers

nothing calls this directly

Calls 1

TimestampMethod · 0.95

Tested by

no test coverage detected