From 3dd16239eed7e1e8d1513750419d3b637a8ec79b Mon Sep 17 00:00:00 2001 From: Eyal Posener Date: Mon, 15 May 2017 23:01:05 +0300 Subject: [PATCH] Add example test to increase coverate --- gocomplete/tests_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) {