summaryrefslogtreecommitdiff
path: root/run_test.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-06 19:08:47 +0300
committerEyal Posener <[email protected]>2017-05-06 19:08:47 +0300
commit07b98cb91243293e26564058a78f28b83aa81cd4 (patch)
tree51c7401296ff07427a4cf5ed337e46edc2996abd /run_test.go
parent99ef98e3bada58261aebbf84432cb8b31b4ed26b (diff)
Use pointers to predicates
Diffstat (limited to 'run_test.go')
-rw-r--r--run_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/run_test.go b/run_test.go
index 0e18850..9800b6a 100644
--- a/run_test.go
+++ b/run_test.go
@@ -16,20 +16,20 @@ func TestCompleter_Complete(t *testing.T) {
c := Command{
Sub: map[string]Command{
"sub1": {
- Flags: map[string]Predicate{
+ Flags: map[string]*Predicate{
"-flag1": PredictAnything,
"-flag2": PredictNothing,
},
},
"sub2": {
- Flags: map[string]Predicate{
+ Flags: map[string]*Predicate{
"-flag2": PredictNothing,
"-flag3": PredictSet("opt1", "opt2", "opt12"),
},
Args: PredictDirs("./tests/").Or(PredictFiles("./tests/*.md")),
},
},
- Flags: map[string]Predicate{
+ Flags: map[string]*Predicate{
"-h": PredictNothing,
"-global1": PredictAnything,
"-o": PredictFiles("./tests/*.txt"),