MCPcopy
hub / github.com/puma/puma-dev / TestStubCommandLineArgs_argReset

Function TestStubCommandLineArgs_argReset

dev/devtest/testutils_test.go:29–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestStubCommandLineArgs_argReset(t *testing.T) {
30 StubCommandLineArgs("one", "two")
31 assert.Equal(t, 2, flag.NArg())
32 assert.Equal(t, []string{"one", "two"}, flag.Args())
33 StubCommandLineArgs()
34 assert.Equal(t, 0, flag.NArg())
35 assert.Equal(t, []string{}, flag.Args())
36}

Callers

nothing calls this directly

Calls 1

StubCommandLineArgsFunction · 0.85

Tested by

no test coverage detected