Skip to content

Commit

Permalink
Merge pull request #799 from Automattic/test-united-states
Browse files Browse the repository at this point in the history
test(core): issue #798
  • Loading branch information
elijah-potter authored Feb 28, 2025
2 parents 8a24ff9 + cfc894f commit d280abf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions harper-core/src/linting/proper_noun_capitalization_linters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,15 @@ mod tests {
assert_lint_count("North America", lint_group(FstDictionary::curated()), 0);
}

#[test]
fn issue_798() {
assert_suggestion_result(
"United states",
lint_group(FstDictionary::curated()),
"United States",
);
}

#[test]
fn united_nations_uppercase() {
assert_suggestion_result(
Expand Down
8 changes: 8 additions & 0 deletions harper-core/src/title_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,12 @@ mod tests {
TestResult::discard()
}
}

#[test]
fn united_states() {
assert_eq!(
make_title_case_str("united states", &PlainEnglish, &FstDictionary::curated()),
"United States"
)
}
}

0 comments on commit d280abf

Please sign in to comment.