diff options
| author | Eyal Posener <[email protected]> | 2017-11-04 11:20:50 +0200 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-11-04 11:32:33 +0200 |
| commit | aae7e1e39fb3554591e2d20b4c86fea9bf2b15bc (patch) | |
| tree | f9a8fe2a68d6e28755a3ef8fc6b73f99a06d5574 /args_test.go | |
| parent | 88e59760adaddb8276c9b15511302890690e2dae (diff) | |
Add logic to complete when last flag uses the equal sign
If the last flag is of the form -flag=value, complete the value according to -flag.
Diffstat (limited to 'args_test.go')
| -rw-r--r-- | args_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/args_test.go b/args_test.go index a211815..e67125e 100644 --- a/args_test.go +++ b/args_test.go @@ -49,7 +49,7 @@ func TestArgs(t *testing.T) { for _, tt := range tests { t.Run(tt.line, func(t *testing.T) { - a := newArgs(strings.Split(tt.line, " ")) + a := newArgs(tt.line) if got, want := strings.Join(a.Completed, " "), tt.completed; got != want { t.Errorf("%s failed: Completed = %q, want %q", t.Name(), got, want) @@ -131,7 +131,7 @@ func TestArgs_From(t *testing.T) { for _, tt := range tests { t.Run(fmt.Sprintf("%s/%d", tt.line, tt.from), func(t *testing.T) { - a := newArgs(strings.Split(tt.line, " ")) + a := newArgs(tt.line) n := a.from(tt.from) if got, want := strings.Join(n.All, " "), tt.newLine; got != want { @@ -205,7 +205,7 @@ func TestArgs_Directory(t *testing.T) { for _, tt := range tests { t.Run(tt.line, func(t *testing.T) { - a := newArgs(strings.Split(tt.line, " ")) + a := newArgs(tt.line) if got, want := a.Directory(), tt.directory; got != want { t.Errorf("%s failed: directory = %q, want %q", t.Name(), got, want) |
