1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-07 07:55:50 +03:00

chore(fuzz): upgrade targets, fix false positives, and add invariant assertions (#11)

- Fix insert_delete target using .unwrap() causing false-positive crashes
  on arbitrary::Error (input exhaustion)
- Fix fuzz Cargo.toml referencing wrong package name (tui-textarea vs
  tui-textarea-2)
- Add invariant assertions (cursor bounds, lines non-empty, selection
  validity) to all targets
- Add 4 new fuzz targets: undo_redo, selection, wrap_render, search
- Expand existing targets with full delete/insert variant coverage,
  input_without_shortcuts, set_yank_text, set_max_histories, and clear
- Add DummyBackend::resize() for variable-width wrap rendering tests
Этот коммит содержится в:
srothgan
2026-02-19 08:44:58 +01:00
коммит произвёл GitHub
родитель 19151a4076
Коммит f169a4b18c
9 изменённых файлов: 827 добавлений и 228 удалений

Просмотреть файл

@@ -11,7 +11,7 @@ cargo-fuzz = true
[dependencies]
libfuzzer-sys = "0.4"
arbitrary = { version = "1", features = ["derive"] }
tui-textarea = { path = "..", features = ["search", "arbitrary"] }
tui-textarea = { package = "tui-textarea-2", path = "..", features = ["search", "arbitrary"] }
tui-textarea-bench = { path = "../bench" }
# Prevent this from interfering with workspaces
@@ -29,3 +29,27 @@ name = "insert_delete"
path = "fuzz_targets/insert_delete.rs"
test = false
doc = false
[[bin]]
name = "undo_redo"
path = "fuzz_targets/undo_redo.rs"
test = false
doc = false
[[bin]]
name = "selection"
path = "fuzz_targets/selection.rs"
test = false
doc = false
[[bin]]
name = "wrap_render"
path = "fuzz_targets/wrap_render.rs"
test = false
doc = false
[[bin]]
name = "search"
path = "fuzz_targets/search.rs"
test = false
doc = false