aboutsummaryrefslogtreecommitdiff
path: root/src/fuzzing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuzzing.rs')
-rw-r--r--src/fuzzing.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fuzzing.rs b/src/fuzzing.rs
new file mode 100644
index 0000000..24d59fd
--- /dev/null
+++ b/src/fuzzing.rs
@@ -0,0 +1,23 @@
+//! Fuzzing helpers.
+
+use super::Options;
+use std::borrow::Cow;
+
+/// Exposed for fuzzing so we can check the slow path is correct.
+pub fn fill_slow_path<'a>(text: &str, options: Options<'_>) -> String {
+ super::fill_slow_path(text, options)
+}
+
+/// Exposed for fuzzing so we can check the slow path is correct.
+pub fn wrap_single_line<'a>(line: &'a str, options: &Options<'_>, lines: &mut Vec<Cow<'a, str>>) {
+ super::wrap_single_line(line, options, lines);
+}
+
+/// Exposed for fuzzing so we can check the slow path is correct.
+pub fn wrap_single_line_slow_path<'a>(
+ line: &'a str,
+ options: &Options<'_>,
+ lines: &mut Vec<Cow<'a, str>>,
+) {
+ super::wrap_single_line_slow_path(line, options, lines)
+}