Skip to content

Commit

Permalink
test(core): fix test that assumed ASCII
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 14, 2025
1 parent b5c3dc4 commit 6a66c84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions harper-core/src/title_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,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_alphanumeric())
if prefix.chars().any(|c| !c.is_ascii_alphanumeric())
|| prefix.is_empty()
|| postfix.chars().any(|c| !c.is_alphanumeric())
|| postfix.chars().any(|c| !c.is_ascii_alphanumeric())
|| postfix.is_empty()
{
return TestResult::discard();
Expand All @@ -204,9 +204,9 @@ mod tests {
#[quickcheck]
fn about_becomes_uppercase(prefix: String, postfix: String) -> TestResult {
// There must be words other than the `a`.
if prefix.chars().any(|c| !c.is_alphanumeric())
if prefix.chars().any(|c| !c.is_ascii_alphanumeric())
|| prefix.is_empty()
|| postfix.chars().any(|c| !c.is_alphanumeric())
|| postfix.chars().any(|c| !c.is_ascii_alphanumeric())
|| postfix.is_empty()
{
return TestResult::discard();
Expand Down

0 comments on commit 6a66c84

Please sign in to comment.