summaryrefslogtreecommitdiff
path: root/gocomplete/tests_test.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-15 23:01:05 +0300
committerEyal Posener <[email protected]>2017-05-15 23:01:05 +0300
commit3dd16239eed7e1e8d1513750419d3b637a8ec79b (patch)
treee8b185f740d29acd5477798f539ba67f04eaef3d /gocomplete/tests_test.go
parentff8cd4ed39884bc6774087809e1593f36c4b90e3 (diff)
Add example test to increase coverate
Diffstat (limited to 'gocomplete/tests_test.go')
-rw-r--r--gocomplete/tests_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/gocomplete/tests_test.go b/gocomplete/tests_test.go
index 4eb2308..f1b294a 100644
--- a/gocomplete/tests_test.go
+++ b/gocomplete/tests_test.go
@@ -4,6 +4,7 @@ import (
"testing"
"github.com/posener/complete"
+ "os"
)
func TestPredictions(t *testing.T) {
@@ -69,7 +70,13 @@ func TestPredictions(t *testing.T) {
}
func BenchmarkFake(b *testing.B) {}
-func Example() {}
+
+func Example() {
+ os.Setenv("COMP_LINE", "go ru")
+ main()
+ // output: run
+
+}
func equal(s1, s2 []string) bool {
if len(s1) != len(s2) {