cli: add tests to cli packages

Closes #1336
This commit is contained in:
Anna Shaleva 2020-08-21 21:36:08 +03:00
parent d6e7d9c281
commit cab767dafe
7 changed files with 641 additions and 0 deletions

17
cli/flags/util_test.go Normal file
View file

@ -0,0 +1,17 @@
package flags
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestEachName(t *testing.T) {
expected := "*one*two*three"
actual := ""
eachName(" one,two ,three", func(s string) {
actual += "*" + s
})
require.Equal(t, expected, actual)
}