Sfoglia il codice sorgente

Fix syntax error in integration test

Simplified command substitution to avoid shell parsing issues.
Instead of nested heredoc in command substitution, write prompt
to file first then read it.
Jesse Vincent 10 mesi fa
parent
commit
dc11a093c3

+ 7 - 4
tests/claude-code/test-subagent-driven-development-integration.sh

@@ -119,8 +119,8 @@ echo ""
 # Capture full output to analyze
 # Capture full output to analyze
 OUTPUT_FILE="$TEST_PROJECT/claude-output.txt"
 OUTPUT_FILE="$TEST_PROJECT/claude-output.txt"
 
 
-# Note: We use a longer timeout since this is integration testing
-timeout 1800 claude -p "$(cat <<'PROMPT'
+# Create prompt file
+cat > "$TEST_PROJECT/prompt.txt" <<'EOF'
 I want you to execute the implementation plan at docs/plans/implementation-plan.md using the subagent-driven-development skill.
 I want you to execute the implementation plan at docs/plans/implementation-plan.md using the subagent-driven-development skill.
 
 
 IMPORTANT: Follow the skill exactly. I will be verifying that you:
 IMPORTANT: Follow the skill exactly. I will be verifying that you:
@@ -131,8 +131,11 @@ IMPORTANT: Follow the skill exactly. I will be verifying that you:
 5. Use review loops when issues are found
 5. Use review loops when issues are found
 
 
 Begin now. Execute the plan.
 Begin now. Execute the plan.
-PROMPT
-)" > "$OUTPUT_FILE" 2>&1 || {
+EOF
+
+# Note: We use a longer timeout since this is integration testing
+PROMPT=$(cat "$TEST_PROJECT/prompt.txt")
+timeout 1800 claude -p "$PROMPT" > "$OUTPUT_FILE" 2>&1 || {
     echo "EXECUTION FAILED"
     echo "EXECUTION FAILED"
     cat "$OUTPUT_FILE"
     cat "$OUTPUT_FILE"
     exit 1
     exit 1