goadb/adb/util_test.go
2020-07-13 14:18:10 +08:00

28 lines
507 B
Go

package adb
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestContainsWhitespaceYes(t *testing.T) {
assert.True(t, containsWhitespace("hello world"))
}
func TestContainsWhitespaceNo(t *testing.T) {
assert.False(t, containsWhitespace("hello"))
}
func TestIsBlankWhenEmpty(t *testing.T) {
assert.True(t, isBlank(""))
}
func TestIsBlankWhenJustWhitespace(t *testing.T) {
assert.True(t, isBlank(" \t"))
}
func TestIsBlankNo(t *testing.T) {
assert.False(t, isBlank(" h "))
}