MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdAddProjectMkdirCreatesMissing

Function TestCmdAddProjectMkdirCreatesMissing

internal/app/add_test.go:89–101  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestCmdAddProjectMkdirCreatesMissing(t *testing.T) {
90 setupFlowRoot(t)
91 parent := t.TempDir()
92 missing := filepath.Join(parent, "new-proj")
93
94 rc := cmdAdd([]string{"project", "New Proj", "--work-dir", missing, "--mkdir"})
95 if rc != 0 {
96 t.Fatalf("rc=%d", rc)
97 }
98 if _, err := os.Stat(missing); err != nil {
99 t.Errorf("work_dir not created: %v", err)
100 }
101}
102
103func TestCmdAddProjectMissingWorkDirFailsWithoutMkdir(t *testing.T) {
104 setupFlowRoot(t)

Callers

nothing calls this directly

Calls 2

setupFlowRootFunction · 0.85
cmdAddFunction · 0.85

Tested by

no test coverage detected