2016-01-15 15:54:27 +00:00
|
|
|
package adb
|
2015-04-12 20:34:20 +00:00
|
|
|
|
|
|
|
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 "))
|
|
|
|
}
|