MCPcopy Create free account
hub / github.com/vale-cli/vale / TestLocalZip

Function TestLocalZip

cmd/vale/pkg_test.go:67–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestLocalZip(t *testing.T) {
68 path, err := mockPath()
69 if err != nil {
70 t.Fatal(err)
71 }
72
73 zip, err := filepath.Abs(filepath.Join(TestData, "write-good.zip"))
74 if err != nil {
75 t.Fatal(err)
76 }
77
78 err = readPkg(zip, path, 0)
79 if err != nil {
80 t.Fatal(err)
81 }
82
83 if !system.IsDir(filepath.Join(path, "write-good")) {
84 t.Fatal("unable to find 'write-good' in StylesPath")
85 }
86
87 if !system.FileExists(filepath.Join(path, "write-good", "E-Prime.yml")) {
88 t.Fatal("unable to find 'E-Prime' in StylesPath")
89 }
90}
91
92func TestLocalDir(t *testing.T) {
93 path, err := mockPath()

Callers

nothing calls this directly

Calls 4

IsDirFunction · 0.92
FileExistsFunction · 0.92
mockPathFunction · 0.85
readPkgFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…