Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix(core): test which was testing the wrong thing (#2946)

Elijah Potter83dcf4eea048
diff --git a/harper-core/src/title_case.rs b/harper-core/src/title_case.rs
index e2bbaf405..35482db87 100644
--- a/harper-core/src/title_case.rs
+++ b/harper-core/src/title_case.rs
@@ -249,9 +249,9 @@ mod tests {
#[quickcheck]
fn a_stays_lowercase(prefix: String, postfix: String) -> TestResult {
// There must be words other than the `a`.
- if prefix.chars().any(|c| !c.is_ascii_alphanumeric())
+ if prefix.chars().any(|c| !c.is_ascii_alphabetic())
|| prefix.is_empty()
- || postfix.chars().any(|c| !c.is_ascii_alphanumeric())
+ || postfix.chars().any(|c| !c.is_ascii_alphabetic())
|| postfix.is_empty()
{
return TestResult::discard();