diff options
| author | Eyal Posener <[email protected]> | 2019-11-14 06:51:44 +0200 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2019-11-18 01:05:47 +0200 |
| commit | 8724aaf18312e54750540a9578e00d61b1c545d8 (patch) | |
| tree | d3e736b4fb279975bbcc017ae1bad53e454c5773 /gocomplete/tests_test.go | |
| parent | 05b68ffc813dd10c420993cb1cf927b346c057b8 (diff) | |
V2
Diffstat (limited to 'gocomplete/tests_test.go')
| -rw-r--r-- | gocomplete/tests_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gocomplete/tests_test.go b/gocomplete/tests_test.go index 150e2e2..b09ca6f 100644 --- a/gocomplete/tests_test.go +++ b/gocomplete/tests_test.go @@ -14,7 +14,7 @@ func TestPredictions(t *testing.T) { tests := []struct { name string predictor complete.Predictor - last string + prefix string want []string }{ { @@ -31,8 +31,7 @@ func TestPredictions(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - a := complete.Args{Last: tt.last} - got := tt.predictor.Predict(a) + got := tt.predictor.Predict(tt.prefix) if !equal(got, tt.want) { t.Errorf("Failed %s: got: %q, want: %q", t.Name(), got, tt.want) } @@ -44,9 +43,9 @@ func BenchmarkFake(b *testing.B) {} func Example() { os.Setenv("COMP_LINE", "go ru") + os.Setenv("COMP_POINT", "5") main() // output: run - } func equal(s1, s2 []string) bool { |
