mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 18:36:30 +03:00
Add property test for simplify_plain_text
This commit is contained in:
committed by
holger krekel
parent
b3b1e37192
commit
d644ca5563
@@ -211,6 +211,16 @@ fn is_plain_quote(buf: &str) -> bool {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use proptest::prelude::*;
|
||||
|
||||
proptest! {
|
||||
#[test]
|
||||
// proptest does not support [[:graphical:][:space:]] regex.
|
||||
fn test_simplify_plain_text_fuzzy(input in "[!-~\t \n]+") {
|
||||
let output = Simplify::new().simplify_plain_text(&input, true);
|
||||
assert!(output.split('\n').all(|s| s != "-- "));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_simplify_trim() {
|
||||
|
||||
Reference in New Issue
Block a user