ReadFile 读取文件内容
(path string)
| 77 | |
| 78 | // ReadFile 读取文件内容 |
| 79 | func (th *TestHelper) ReadFile(path string) string { |
| 80 | content, err := os.ReadFile(path) |
| 81 | if err != nil { |
| 82 | th.T.Fatalf("Failed to read file: %v", err) |
| 83 | } |
| 84 | return string(content) |
| 85 | } |
| 86 | |
| 87 | // FileExists 检查文件是否存在 |
| 88 | func (th *TestHelper) FileExists(path string) bool { |
no outgoing calls