(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestProcessIncludesWithWorkflowSpec_LegacySyntax(t *testing.T) { |
| 53 | // Test with legacy @include syntax |
| 54 | content := `--- |
| 55 | engine: claude |
| 56 | --- |
| 57 | |
| 58 | # Test Workflow |
| 59 | |
| 60 | Some content here. |
| 61 | |
| 62 | @include? shared/config.md |
| 63 | |
| 64 | More content. |
| 65 | ` |
| 66 | |
| 67 | workflow := &WorkflowSpec{ |
| 68 | RepoSpec: RepoSpec{ |
| 69 | RepoSlug: "githubnext/agentics", |
| 70 | Version: "main", |
| 71 | }, |
| 72 | } |
| 73 | |
| 74 | result, err := processIncludesWithWorkflowSpec(content, workflow, "", "/tmp/package", "", false) |
| 75 | if err != nil { |
| 76 | t.Fatalf("Expected no error, got: %v", err) |
| 77 | } |
| 78 | |
| 79 | // Should convert to @include with workflowspec |
| 80 | expectedInclude := "{{#import? githubnext/agentics/shared/config.md@main}}" |
| 81 | if !strings.Contains(result, expectedInclude) { |
| 82 | t.Errorf("Expected result to contain '%s'\nGot:\n%s", expectedInclude, result) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func TestProcessIncludesWithWorkflowSpec_WithCommitSHA(t *testing.T) { |
| 87 | // Test with commit SHA |
nothing calls this directly
no test coverage detected