(t *testing.T)
| 79 | } |
| 80 | |
| 81 | func TestArgsParser_Values(t *testing.T) { |
| 82 | p := NewArgsParser() |
| 83 | p.RegisterValue("--origin", "-o") |
| 84 | args := []string{"--origin=a=b", "--origin=", "--origin", "c", "-o"} |
| 85 | rest, err := p.Parse(args) |
| 86 | equal(t, errors.New("no value given for '-o'"), err) |
| 87 | equal(t, []string{}, rest) |
| 88 | equal(t, []string{"a=b", "", "c"}, p.AllValues("--origin")) |
| 89 | } |
| 90 | |
| 91 | func TestArgsParser_Bool(t *testing.T) { |
| 92 | p := NewArgsParser() |
nothing calls this directly
no test coverage detected
searching dependent graphs…