(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func TestArgsParser_RepeatedArg(t *testing.T) { |
| 161 | p := NewArgsParser() |
| 162 | p.RegisterValue("--msg", "-m") |
| 163 | args := []string{"--msg=hello", "-m", "world", "--msg", "how", "-mare you?"} |
| 164 | rest, err := p.Parse(args) |
| 165 | equal(t, nil, err) |
| 166 | equal(t, []string{}, rest) |
| 167 | equal(t, "are you?", p.Value("--msg")) |
| 168 | equal(t, []string{"hello", "world", "how", "are you?"}, p.AllValues("--msg")) |
| 169 | } |
| 170 | |
| 171 | func TestArgsParser_Int(t *testing.T) { |
| 172 | p := NewArgsParser() |
nothing calls this directly
no test coverage detected
searching dependent graphs…