MCPcopy Index your code
hub / github.com/github/gh-aw / TestExpandIncludesForEngines

Function TestExpandIncludesForEngines

pkg/parser/engine_includes_test.go:15–192  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestExpandIncludesForEngines(t *testing.T) {
16 tests := []struct {
17 name string
18 includeFiles map[string]string
19 mainContent string
20 expectedLen int
21 expectedExact map[int]string
22 expectedContains map[int][]string
23 }{
24 {
25 name: "single string engine",
26 includeFiles: map[string]string{
27 "include-engine.md": `---
28engine: codex
29tools:
30 github:
31 allowed: ["list_issues"]
32---
33
34# Include with Engine
35`,
36 },
37 mainContent: `# Main Workflow
38
39@include include-engine.md
40
41Some content here.
42`,
43 expectedLen: 1,
44 expectedExact: map[int]string{0: `"codex"`},
45 },
46 {
47 name: "object format engine",
48 includeFiles: map[string]string{
49 "include-object-engine.md": `---
50engine:
51 id: claude
52 model: claude-3-5-sonnet-20241022
53 max-turns: 5
54tools:
55 github:
56 allowed: ["list_issues"]
57---
58
59# Include with Object Engine
60`,
61 },
62 mainContent: `# Main Workflow
63
64@include include-object-engine.md
65
66Some content here.
67`,
68 expectedLen: 1,
69 expectedContains: map[int][]string{
70 0: {`"id":"claude"`, `"model":"claude-3-5-sonnet-20241022"`, `"max-turns":5`},
71 },
72 },

Callers

nothing calls this directly

Calls 3

TempDirFunction · 0.92
ExpandIncludesForEnginesFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected