go test -run 正则表达式使用
go test -run
使用 的是正则表达式:
go test -<span style="color:#f5ab35">run</span> <regex>运行Test开头的所有测试函数:
go test -run ^Test运行所有包含Add的测试函数:
go test -<span style="color:#f5ab35">run</span> <span style="color:#f5ab35">Add</span>运行Test开头Number结尾的测试函数:
go test -run ^Test.*Numbers$