mirror of
https://github.com/github/spec-kit.git
synced 2026-07-06 05:53:12 +08:00
test: update test_argument_token_format for forgecode special case
Forgecode uses {{parameters}} instead of the standard $ARGUMENTS
placeholder. Updated test to check for the correct placeholder format
for forgecode agent.
- Added special case handling for forgecode in test_argument_token_format
- Updated docstring to document forgecode's {{parameters}} format
- Test now passes for all 26 agents including forgecode
This commit is contained in:
@@ -351,7 +351,8 @@ _TEMPLATES_WITH_ARGS: frozenset[str] = frozenset(
|
||||
def test_argument_token_format(agent, scaffolded_sh):
|
||||
"""For templates that carry an {ARGS} token:
|
||||
- TOML agents must emit {{args}}
|
||||
- Markdown agents must emit $ARGUMENTS
|
||||
- Forgecode must emit {{parameters}}
|
||||
- Other Markdown agents must emit $ARGUMENTS
|
||||
Templates without {ARGS} (e.g. implement, plan) are skipped.
|
||||
"""
|
||||
project = scaffolded_sh(agent)
|
||||
@@ -374,6 +375,11 @@ def test_argument_token_format(agent, scaffolded_sh):
|
||||
assert "{{args}}" in content, (
|
||||
f"TOML agent '{agent}': expected '{{{{args}}}}' in '{f.name}'"
|
||||
)
|
||||
elif agent == "forgecode":
|
||||
# Forgecode uses {{parameters}} instead of $ARGUMENTS
|
||||
assert "{{parameters}}" in content, (
|
||||
f"Forgecode agent: expected '{{{{parameters}}}}' in '{f.name}'"
|
||||
)
|
||||
else:
|
||||
assert "$ARGUMENTS" in content, (
|
||||
f"Markdown agent '{agent}': expected '$ARGUMENTS' in '{f.name}'"
|
||||
|
||||
Reference in New Issue
Block a user