MCPcopy Create free account
hub / github.com/astercloud/aster / AssertFileNotExists

Function AssertFileNotExists

pkg/tools/builtin/testutils.go:348–352  ·  view source on GitHub ↗

AssertFileNotExists 断言文件不存在

(t *testing.T, path string)

Source from the content-addressed store, hash-verified

346
347// AssertFileNotExists 断言文件不存在
348func 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 断言文件内容
355func AssertFileContent(t *testing.T, path, expectedContent string) {

Callers

nothing calls this directly

Calls 1

StatMethod · 0.65

Tested by

no test coverage detected