goProject/trunk/goutil/dfaExUtil/dfaEx_test.go
皮蛋13361098506 1b77f62820 初始化项目
2025-01-06 16:01:02 +08:00

16 lines
445 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package dfaExUtil
import "testing"
func TestHandleWord(t *testing.T) {
strs := []string{"ABC", "1234", "测试", "测试代码", "测试一下"}
dfaEx1 := NewDFAEx(strs)
str := dfaEx1.HandleWord("abc按了数字12345来测试代码是否正常结果测试出了bug", '*')
t.Log(str)
dfaEx2 := NewDFAEx(strs, true)
str = dfaEx2.HandleWord("abc按了数字12345来测试代码是否正常结果测试出了bug", '*')
t.Log(str)
}