AssertFileNotExists 断言文件不存在
(t *testing.T, path string)
| 346 | |
| 347 | // AssertFileNotExists 断言文件不存在 |
| 348 | func AssertFileNotExists(t *testing.T, path string) { |
| 349 | if _, err := os.Stat(path); !os.IsNotExist(err) { |
| 350 | t.Errorf("Expected file %q to not exist, but it does", path) |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | // AssertFileContent 断言文件内容 |
| 355 | func AssertFileContent(t *testing.T, path, expectedContent string) { |