gitee.com/haifengat/cas@v0.0.6/demo/main_test.go (about) 1 package main 2 3 import ( 4 "os" 5 "testing" 6 ) 7 8 func TestMain(t *testing.T) { 9 t.Run("main", func(t *testing.T) { 10 os.Chdir("../") // 切换工作目录 11 main() 12 }) 13 }