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

Function TestParseMultiInt

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

Source from the content-addressed store, hash-verified

2016}
2017
2018func TestParseMultiInt(t *testing.T) {
2019 _ = (&Command{
2020 Flags: []Flag{
2021 &Int64Flag{Name: "serve", Aliases: []string{"s"}},
2022 },
2023 Action: func(_ context.Context, cmd *Command) error {
2024 assert.Equal(t, int64(10), cmd.Int64("serve"), "main name not set")
2025 assert.Equal(t, int64(10), cmd.Int64("s"), "short name not set")
2026 return nil
2027 },
2028 }).Run(buildTestContext(t), []string{"run", "-s", "10"})
2029}
2030
2031func TestParseDestinationInt(t *testing.T) {
2032 var dest int64

Callers

nothing calls this directly

Calls 3

buildTestContextFunction · 0.85
Int64Method · 0.80
RunMethod · 0.45

Tested by

no test coverage detected