949682a176
- test_rebase_apply_pick_preserves.sh - test_rebase_apply_drop_removes.sh - test_rebase_apply_edit_updates_role.sh - test_rebase_apply_edit_preserves_fields.sh - test_rebase_apply_implicit_pick.sh - test_rebase_apply_mixed_commands.sh - test_rebase_apply_empty_lines_preserves.sh - test_rebase_apply_lenient_orphaned_results.sh - test_rebase_apply_edit_preserves_tool_calls.sh - test_rebase_apply_deleting_lines_drops.sh - test_rebase_apply_all_lines_deleted_keeps.sh Removed the combined test_rebase_apply.sh file and updated CMakeLists.txt to include the 11 new individual test files.
29 lines
765 B
Bash
Executable File
29 lines
765 B
Bash
Executable File
#!/bin/bash
|
|
# test_rebase_apply_pick_preserves.sh - Pick commands preserve messages unchanged
|
|
|
|
lines=$(create_rebase_lines pick 0 user)
|
|
history=$(create_messages_json user "hello world")
|
|
|
|
OUTPUT=$("${DRHARNESS}" -A "$lines" "$history")
|
|
|
|
if ! echo "$OUTPUT" | grep -q '"hello world"'; then
|
|
echo "FAIL: pick_preserves_message - content should be preserved"
|
|
echo "Got: $OUTPUT"
|
|
exit 1
|
|
fi
|
|
|
|
if ! echo "$OUTPUT" | grep -q '"role".*"user"'; then
|
|
echo "FAIL: pick_preserves_message - role should be preserved"
|
|
echo "Got: $OUTPUT"
|
|
exit 1
|
|
fi
|
|
|
|
# Check we got 1 message back
|
|
if ! echo "$OUTPUT" | grep -q '"role"'; then
|
|
echo "FAIL: pick_preserves_message - expected output"
|
|
echo "Got: $OUTPUT"
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: pick_preserves_message"
|