MCPcopy Create free account
hub / github.com/driangle/taskmd / resetAddFlags

Function resetAddFlags

apps/cli/internal/cli/add_test.go:12–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10)
11
12func resetAddFlags() {
13 addPriority = "medium"
14 addEffort = ""
15 addTags = ""
16 addStatus = "pending"
17 addOwner = ""
18 addDependsOn = ""
19 addParent = ""
20 addGroup = ""
21 addFormat = "plain"
22 addEdit = false
23 addTemplate = ""
24 addSlug = ""
25 addPhase = ""
26 taskDir = "."
27
28 // Reset cobra flag "changed" state for template override tests
29 for _, name := range []string{"priority", "status", "effort", "tags", "owner", "depends-on", "parent", "phase"} {
30 if f := addCmd.Flags().Lookup(name); f != nil {
31 f.Changed = false
32 }
33 }
34}
35
36func captureAddOutput(t *testing.T, title string) (string, error) {
37 t.Helper()

Callers 15

TestAdd_HappyPathFunction · 0.85
TestAdd_AllFlagsFunction · 0.85
TestAdd_GroupFlagFunction · 0.85
TestAdd_JSONOutputFunction · 0.85
TestAdd_InvalidPriorityFunction · 0.85
TestAdd_InvalidEffortFunction · 0.85
TestAdd_InvalidStatusFunction · 0.85
TestAdd_EmptyDirectoryFunction · 0.85
TestAdd_SequentialIDsFunction · 0.85
TestAdd_DependsOnParsingFunction · 0.85
TestAdd_TagsParsingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected