Files
drharness/tests/process_reasoning.sh
darthrubik 1cb6553d85 Fix issue #107: Move JSON parsing from test file to helper functions
- Add dr_reasoning() helper to run_test.sh
- Add dr_reasoning_content() helper to run_test.sh
- Update process_reasoning.sh to use helper functions instead of direct jq calls

This follows CONTRIBUTING.md guidelines that prohibit direct JSON
parsing in test files.
2026-05-30 13:42:39 -05:00

20 lines
542 B
Bash

#!/bin/bash
reasoning_step "I should do X because Y" >> reasoning
reasoning_content_step "I should do X because Y" >> reasoning_content
$DRHARNESS -n -F reasoning.json -m "Test" -d < reasoning
$DRHARNESS -n -F reasoning_content.json -m "Test" -d < reasoning_content
if [[ "$(dr_reasoning reasoning.json 1)" != "I should do X because Y" ]]; then
echo "reasoning mismatch"
exit 1
fi
if [[ "$(dr_reasoning_content reasoning_content.json 1)" != "I should do X because Y" ]]; then
echo "reasoning_content mismatch"
exit 1
fi