diff options
| author | Eyal Posener <[email protected]> | 2017-11-04 11:57:02 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-04 11:57:02 +0200 |
| commit | dc2bc5a81accba8782bebea28628224643a8286a (patch) | |
| tree | 0f7976f712f3cb3c70eac8eb78b5027e445e16c8 /args_test.go | |
| parent | 00c86494ff7035cfd62f66042e9ca2b118b90122 (diff) | |
| parent | a1f9ea005b8360153429321071da4e42ce6ce323 (diff) | |
Merge pull request #54 from posener/split-last-equal
Add logic to complete when last flag uses the equal sign
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) |
