Files
drharness/tests/test_rebase_apply_implicit_pick.sh
darthrubik 949682a176 Split test_rebase_apply.sh into individual test files (issue 131)
- 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.
2026-06-03 07:02:15 -05:00

20 lines
613 B
Bash
Executable File

#!/bin/bash
# test_rebase_apply_implicit_pick.sh - Messages not referenced by any command are dropped (implicit drop)
# Only specify command for index 0, index 1 should be implicitly dropped
lines=$(create_rebase_lines pick 0 user)
history=$(create_messages_json user "hello" assistant "hi there")
OUTPUT=$("${DRHARNESS}" -A "$lines" "$history")
# Should have 1 message (index 1 dropped)
msg_count=$(echo "$OUTPUT" | grep -o '"role"' | wc -l)
if [ "$msg_count" -ne 1 ]; then
echo "FAIL: implicit_pick - expected 1 message, got $msg_count"
echo "Got: $OUTPUT"
exit 1
fi
echo "PASS: implicit_pick"