ralph-claude-code/tests/unit
frankbria 30cdf78331 fix(loop): replace non-existent --prompt-file with -p flag
The build_claude_command() function was incorrectly using --prompt-file
which doesn't exist in Claude Code CLI. This fix:

- Replaces --prompt-file with -p flag plus prompt content
- Reads prompt content via $(cat "$prompt_file") before execution
- Adds error handling for missing prompt files
- Maintains shell injection safety through array-based command building
- Updates comments to reflect the correct approach

Adds 6 TDD tests verifying the fix:
- Uses -p flag instead of --prompt-file
- Reads prompt file content correctly
- Handles missing prompt file
- Includes all modern CLI flags
- Handles multiline prompt content
- Prevents shell injection

Test count: 145 -> 151 (all passing)
2026-01-09 13:44:50 -07:00
..
test_cli_modern.bats fix(loop): replace non-existent --prompt-file with -p flag 2026-01-09 13:44:50 -07:00
test_cli_parsing.bats test(cli): add --allowed-tools test and code review report 2026-01-08 22:42:50 -07:00
test_exit_detection.bats Add comprehensive test infrastructure and core unit tests 2025-09-30 22:56:02 -07:00
test_json_parsing.bats feat(cli): add modern CLI commands with JSON output support (Phase 1.1) 2026-01-08 20:39:18 -07:00
test_rate_limiting.bats Add comprehensive test infrastructure and core unit tests 2025-09-30 22:56:02 -07:00