Lightweight coding agent that runs in your terminal
Rust
chore(apply-patch) additional scenarios (#8230)
Dylan Hurdb1c93e135bfd
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/expected/keep.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/expected/keep.txtnew file mode 100644index 0000000000..2fa992c0b8--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/expected/keep.txt@@ -0,0 +1 @@+keepdiff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/input/keep.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/input/keep.txtnew file mode 100644index 0000000000..2fa992c0b8--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/input/keep.txt@@ -0,0 +1 @@+keepdiff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/input/obsolete.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/input/obsolete.txtnew file mode 100644index 0000000000..6e263abce1--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/input/obsolete.txt@@ -0,0 +1 @@+obsoletediff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/patch.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/patch.txtnew file mode 100644index 0000000000..5978f73889--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/020_delete_file_success/patch.txt@@ -0,0 +1,3 @@+*** Begin Patch+*** Delete File: obsolete.txt+*** End Patchdiff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/expected/lines.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/expected/lines.txtnew file mode 100644index 0000000000..8129d305c8--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/expected/lines.txt@@ -0,0 +1,2 @@+line1+line3diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/input/lines.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/input/lines.txtnew file mode 100644index 0000000000..83db48f84e--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/input/lines.txt@@ -0,0 +1,3 @@+line1+line2+line3diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/patch.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/patch.txtnew file mode 100644index 0000000000..860c6c9a99--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/021_update_file_deletion_only/patch.txt@@ -0,0 +1,7 @@+*** Begin Patch+*** Update File: lines.txt+@@+ line1+-line2+ line3+*** End Patchdiff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/expected/tail.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/expected/tail.txtnew file mode 100644index 0000000000..87463f92d7--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/expected/tail.txt@@ -0,0 +1,2 @@+first+second updateddiff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/input/tail.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/input/tail.txtnew file mode 100644index 0000000000..66a52ee7a1--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/input/tail.txt@@ -0,0 +1,2 @@+first+seconddiff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/patch.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/patch.txtnew file mode 100644index 0000000000..8b16b5bd9e--- /dev/null+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/022_update_file_end_of_file_marker/patch.txt@@ -0,0 +1,8 @@+*** Begin Patch+*** Update File: tail.txt+@@+ first+-second++second updated+*** End of File+*** End Patch