mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
f287e0a220
* add message to conditions Signed-off-by: Jim Bugwadia <jim@nirmata.com> * add tests Signed-off-by: Jim Bugwadia <jim@nirmata.com> * extend tests Signed-off-by: Jim Bugwadia <jim@nirmata.com> --------- Signed-off-by: Jim Bugwadia <jim@nirmata.com>
14 lines
428 B
Go
14 lines
428 B
Go
package strings
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestJoins(t *testing.T) {
|
|
assert.Equal(t, "test", JoinNonEmpty([]string{"test", ""}, ","))
|
|
assert.Equal(t, "test,test", JoinNonEmpty([]string{"test", "test"}, ","))
|
|
assert.Equal(t, "test; test", JoinNonEmpty([]string{"test", "", "test", ""}, "; "))
|
|
assert.Equal(t, "fi fo fum", JoinNonEmpty([]string{"", "fi", "", "fo", "", "fum"}, " "))
|
|
}
|