TestSpec_PublicAPI_IsWorkflowSpec validates the documented behavior of IsWorkflowSpec as described in the package README.md. Specification: Returns whether a path is a workflow specification markdown file (i.e. of the form owner/repo/path[@ref]).
(t *testing.T)
| 89 | // Specification: Returns whether a path is a workflow specification markdown file |
| 90 | // (i.e. of the form owner/repo/path[@ref]). |
| 91 | func TestSpec_PublicAPI_IsWorkflowSpec(t *testing.T) { |
| 92 | tests := []struct { |
| 93 | name string |
| 94 | input string |
| 95 | expected bool |
| 96 | }{ |
| 97 | { |
| 98 | name: "owner/repo/path is recognised as workflowspec", |
| 99 | input: "github/gh-aw/workflows/build.md", |
| 100 | expected: true, |
| 101 | }, |
| 102 | { |
| 103 | name: "owner/repo/path@ref is recognised as workflowspec", |
| 104 | input: "github/gh-aw/workflows/build.md@main", |
| 105 | expected: true, |
| 106 | }, |
| 107 | { |
| 108 | name: "local relative path is not a workflowspec", |
| 109 | input: ".github/workflows/build.md", |
| 110 | expected: false, |
| 111 | }, |
| 112 | { |
| 113 | name: "shared/ prefixed path is not a workflowspec", |
| 114 | input: "shared/base.md", |
| 115 | expected: false, |
| 116 | }, |
| 117 | { |
| 118 | name: "single-segment path is not a workflowspec", |
| 119 | input: "workflow.md", |
| 120 | expected: false, |
| 121 | }, |
| 122 | } |
| 123 | |
| 124 | for _, tt := range tests { |
| 125 | t.Run(tt.name, func(t *testing.T) { |
| 126 | result := IsWorkflowSpec(tt.input) |
| 127 | assert.Equal(t, tt.expected, result, |
| 128 | "IsWorkflowSpec(%q) should match documented workflowspec form", tt.input) |
| 129 | }) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | // TestSpec_InlineSubAgents_GetEngineSubAgentExt validates the documented |
| 134 | // behavior of GetEngineSubAgentExt as described in the package README.md. |
nothing calls this directly
no test coverage detected