More validation.

This commit is contained in:
Alec Thomas
2018-05-18 21:30:44 +10:00
parent d03571a873
commit 3b21a54094
2 changed files with 19 additions and 2 deletions
+10
View File
@@ -124,3 +124,13 @@ func TestMatchingArgField(t *testing.T) {
_, err := New(&cli)
require.Error(t, err)
}
func TestCantMixPositionalAndBranches(t *testing.T) {
var cli struct {
Arg string `arg:""`
Command struct {
} `cmd:""`
}
_, err := New(&cli)
require.Error(t, err)
}