Minor bits while giving up (for now?) on command context
This commit is contained in:
parent
1080737931
commit
58842504c4
@ -7,10 +7,6 @@ type TypedNode struct {
|
||||
Node Node `json:"node"`
|
||||
}
|
||||
|
||||
type Args struct {
|
||||
Nodes []Node `json:"nodes"`
|
||||
}
|
||||
|
||||
type CompoundShortFlag struct {
|
||||
Nodes []Node `json:"nodes"`
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ func TestParser(t *testing.T) {
|
||||
expPT []argh.Node
|
||||
expAST []argh.Node
|
||||
expErr error
|
||||
skip bool
|
||||
}{
|
||||
{
|
||||
name: "bare",
|
||||
@ -306,6 +307,10 @@ func TestParser(t *testing.T) {
|
||||
},
|
||||
{},
|
||||
} {
|
||||
if tc.skip {
|
||||
continue
|
||||
}
|
||||
|
||||
if tc.expPT != nil {
|
||||
t.Run(tc.name+" parse tree", func(ct *testing.T) {
|
||||
actual, err := argh.ParseArgs(tc.args, tc.cfg)
|
||||
|
@ -33,6 +33,12 @@ func TestQuerier_Program(t *testing.T) {
|
||||
exp: argh.Program{},
|
||||
expOK: false,
|
||||
},
|
||||
{
|
||||
name: "invalid flag only",
|
||||
args: []string{"--oh-no"},
|
||||
exp: argh.Program{},
|
||||
expOK: false,
|
||||
},
|
||||
} {
|
||||
t.Run(tc.name, func(ct *testing.T) {
|
||||
pt, err := argh.ParseArgs(tc.args, tc.cfg)
|
||||
|
Loading…
Reference in New Issue
Block a user