(t *testing.T)
| 271 | } |
| 272 | |
| 273 | func TestNormalizeWorkflowID(t *testing.T) { |
| 274 | tests := []struct { |
| 275 | name string |
| 276 | input string |
| 277 | expected string |
| 278 | }{ |
| 279 | { |
| 280 | name: "workflow ID without extension", |
| 281 | input: "my-workflow", |
| 282 | expected: "my-workflow", |
| 283 | }, |
| 284 | { |
| 285 | name: "workflow ID with .md extension", |
| 286 | input: "my-workflow.md", |
| 287 | expected: "my-workflow", |
| 288 | }, |
| 289 | { |
| 290 | name: "full path with .md extension", |
| 291 | input: ".github/workflows/my-workflow.md", |
| 292 | expected: "my-workflow", |
| 293 | }, |
| 294 | { |
| 295 | name: "absolute path with .md extension", |
| 296 | input: "/home/user/project/.github/workflows/my-workflow.md", |
| 297 | expected: "my-workflow", |
| 298 | }, |
| 299 | { |
| 300 | name: "relative path with .md extension", |
| 301 | input: "../../.github/workflows/my-workflow.md", |
| 302 | expected: "my-workflow", |
| 303 | }, |
| 304 | { |
| 305 | name: "workflow with hyphens", |
| 306 | input: ".github/workflows/agent-performance-analyzer.md", |
| 307 | expected: "agent-performance-analyzer", |
| 308 | }, |
| 309 | { |
| 310 | name: "workflow without path but with .md", |
| 311 | input: "test-workflow.md", |
| 312 | expected: "test-workflow", |
| 313 | }, |
| 314 | { |
| 315 | name: "workflow ID with .lock.yml extension", |
| 316 | input: "my-workflow.lock.yml", |
| 317 | expected: "my-workflow", |
| 318 | }, |
| 319 | { |
| 320 | name: "full path with .lock.yml extension", |
| 321 | input: ".github/workflows/my-workflow.lock.yml", |
| 322 | expected: "my-workflow", |
| 323 | }, |
| 324 | { |
| 325 | name: "absolute path with .lock.yml extension", |
| 326 | input: "/home/user/project/.github/workflows/my-workflow.lock.yml", |
| 327 | expected: "my-workflow", |
| 328 | }, |
| 329 | } |
| 330 |
nothing calls this directly
no test coverage detected