Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

chore(apply-patch) unicode scenario (#8141)

Dylan Hurdae3793eb5d83
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/005_rejects_empty_patch/expected/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/005_rejects_empty_patch/expected/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/005_rejects_empty_patch/expected/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/005_rejects_empty_patch/input/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/005_rejects_empty_patch/input/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/005_rejects_empty_patch/input/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/007_rejects_missing_file_delete/expected/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/007_rejects_missing_file_delete/expected/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/007_rejects_missing_file_delete/expected/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/007_rejects_missing_file_delete/input/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/007_rejects_missing_file_delete/input/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/007_rejects_missing_file_delete/input/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/008_rejects_empty_update_hunk/expected/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/008_rejects_empty_update_hunk/expected/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/008_rejects_empty_update_hunk/expected/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/008_rejects_empty_update_hunk/input/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/008_rejects_empty_update_hunk/input/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/008_rejects_empty_update_hunk/input/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/009_requires_existing_file_for_update/expected/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/009_requires_existing_file_for_update/expected/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/009_requires_existing_file_for_update/expected/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/009_requires_existing_file_for_update/input/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/009_requires_existing_file_for_update/input/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/009_requires_existing_file_for_update/input/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/012_delete_directory_fails/expected/dir/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/012_delete_directory_fails/expected/dir/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/012_delete_directory_fails/expected/dir/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/012_delete_directory_fails/input/dir/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/012_delete_directory_fails/input/dir/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/012_delete_directory_fails/input/dir/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/013_rejects_invalid_hunk_header/expected/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/013_rejects_invalid_hunk_header/expected/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/013_rejects_invalid_hunk_header/expected/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/013_rejects_invalid_hunk_header/input/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/013_rejects_invalid_hunk_header/input/foo.txt
new file mode 100644
index 0000000000..2bf5ad0447
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/013_rejects_invalid_hunk_header/input/foo.txt
@@ -0,0 +1 @@
+stable
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/expected/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/expected/foo.txt
new file mode 100644
index 0000000000..99d5a6e9c2
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/expected/foo.txt
@@ -0,0 +1,3 @@
+line1
+naïve café ✅
+line3
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/input/foo.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/input/foo.txt
new file mode 100644
index 0000000000..b170948713
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/input/foo.txt
@@ -0,0 +1,3 @@
+line1
+naïve café
+line3
diff --git a/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/patch.txt b/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/patch.txt
new file mode 100644
index 0000000000..9514207fde
--- /dev/null
+++ b/codex-rs/apply-patch/tests/fixtures/scenarios/019_unicode_simple/patch.txt
@@ -0,0 +1,7 @@
+*** Begin Patch
+*** Update File: foo.txt
+@@
+ line1
+-naïve café
++naïve café ✅
+*** End Patch