|
@@ -29,6 +29,18 @@ func TestHasBlank(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+func TestHasText(t *testing.T) {
|
|
|
+ hasText := HasText("a", "", "b")
|
|
|
+ if !hasText {
|
|
|
+ t.Fatal("字符串包含字符串检测失败")
|
|
|
+ }
|
|
|
+
|
|
|
+ hasText = HasText("", "", "")
|
|
|
+ if hasText {
|
|
|
+ t.Fatal("字符串不包含字符串但是检测失败")
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
func TestIsStringEmpty(t *testing.T) {
|
|
|
stringEmpty := IsStringEmpty("")
|
|
|
if !stringEmpty {
|