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

Function TestSet_PositionalArgAndFlagConflict

apps/cli/internal/cli/set_test.go:1195–1209  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1193}
1194
1195func TestSet_PositionalArgAndFlagConflict(t *testing.T) {
1196 tmpDir := createSetTestFiles(t)
1197 resetSetFlags()
1198 taskDir = tmpDir
1199 setTaskID = "002"
1200 setStatus = "completed"
1201
1202 _, err := captureSetOutputWithArgs(t, []string{"001"})
1203 if err == nil {
1204 t.Fatal("Expected error when positional arg and --task-id conflict")
1205 }
1206 if !strings.Contains(err.Error(), "conflicting task ID") {
1207 t.Errorf("Expected 'conflicting task ID' error, got: %v", err)
1208 }
1209}
1210
1211func TestSet_NeitherPositionalNorFlag(t *testing.T) {
1212 tmpDir := createSetTestFiles(t)

Callers

nothing calls this directly

Calls 4

createSetTestFilesFunction · 0.85
resetSetFlagsFunction · 0.85
captureSetOutputWithArgsFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected