(t *testing.T)
| 222 | } |
| 223 | |
| 224 | func TestSessionNewRejectsInvalidWorkspaceFlags(t *testing.T) { |
| 225 | t.Parallel() |
| 226 | |
| 227 | code, _, stderr := executeRootCommandWithExit(t, newTestDeps(t, &stubClient{}), |
| 228 | "session", "new", "--workspace", "ws_abc", "--cwd", "/tmp/proj", |
| 229 | ) |
| 230 | if code != 1 { |
| 231 | t.Fatalf("executeRootCommandWithExit() code = %d, want 1", code) |
| 232 | } |
| 233 | if !strings.Contains(stderr, "--workspace and --cwd are mutually exclusive") { |
| 234 | t.Fatalf("stderr = %q, want workspace flag validation message", stderr) |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | func TestSessionNewRejectsRelativeCWD(t *testing.T) { |
| 239 | t.Parallel() |
nothing calls this directly
no test coverage detected