MCPcopy
hub / github.com/mislav/hub / TestArgsParser_Dashes

Function TestArgsParser_Dashes

utils/args_parser_test.go:150–158  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

148}
149
150func TestArgsParser_Dashes(t *testing.T) {
151 p := NewArgsParser()
152 p.RegisterValue("--file", "-F")
153 args := []string{"-F-", "-", "--", "-F", "--"}
154 rest, err := p.Parse(args)
155 equal(t, nil, err)
156 equal(t, []string{"-", "-F", "--"}, rest)
157 equal(t, "-", p.Value("--file"))
158}
159
160func TestArgsParser_RepeatedArg(t *testing.T) {
161 p := NewArgsParser()

Callers

nothing calls this directly

Calls 5

RegisterValueMethod · 0.95
ParseMethod · 0.95
ValueMethod · 0.95
NewArgsParserFunction · 0.85
equalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…