core-agent-ide/codex-rs/apply-patch/tests/fixtures/scenarios
Dylan Hurd ae3793eb5d
chore(apply-patch) unicode scenario (#8141)
## Summary
Adds a unicode scenario, and fills in files on failing scenarios to
ensure directory state is unchanged, for completeness

## Testing
- [x] only changes tests
2025-12-16 22:40:22 -08:00
..
001_add_file chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
002_multiple_operations chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
003_multiple_chunks chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
004_move_to_new_directory chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
005_rejects_empty_patch chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
006_rejects_missing_context chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
007_rejects_missing_file_delete chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
008_rejects_empty_update_hunk chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
009_requires_existing_file_for_update chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
010_move_overwrites_existing_destination chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
011_add_overwrites_existing_file chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
012_delete_directory_fails chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
013_rejects_invalid_hunk_header chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
014_update_file_appends_trailing_newline chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
015_failure_after_partial_success_leaves_changes chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
016_pure_addition_update_chunk chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
017_whitespace_padded_hunk_header chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
018_whitespace_padded_patch_markers chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
019_unicode_simple chore(apply-patch) unicode scenario (#8141) 2025-12-16 22:40:22 -08:00
.gitattributes chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00
README.md chore(apply-patch) scenarios for e2e testing (#7567) 2025-12-05 00:20:54 +00:00

Overview

This directory is a collection of end to end tests for the apply-patch specification, meant to be easily portable to other languages or platforms.

Specification

Each test case is one directory, composed of input state (input/), the patch operation (patch.txt), and the expected final state (expected/). This structure is designed to keep tests simple (i.e. test exactly one patch at a time) while still providing enough flexibility to test any given operation across files.

Here's what this would look like for a simple test apply-patch test case to create a new file:

001_add/
  input/
    foo.md
  expected/
    foo.md
    bar.md
  patch.txt