Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
test: more en-AU & en-CA vs en-BR & en-US
hippietrail19e64c57c4fe
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dictindex 8b2a683ee..ac5c3c0b8 100644--- a/harper-core/dictionary.dict+++ b/harper-core/dictionary.dict@@ -5653,6 +5653,8 @@ LVN/1La/21SMLab/12Laban/2M+Labor/2M_ # the australian political party doesn't use the normal australian spelling of 'labour'+Labour/2M! # the uk political party does use the normal british spelling of 'labour'Labrador/21SMLabradorean/51Lacey/2M@@ -50189,7 +50191,8 @@ venturousness/1Mvenue/~1ASMveracious/5Yveracity/~1M-veranda/1SM+veranda/1SM!@<+verandah/1SM_verapamil/1verb/~14KMSverbal/~514MYSdiff --git a/harper-core/src/linting/spell_check.rs b/harper-core/src/linting/spell_check.rsindex 046af1acd..6e649e91c 100644--- a/harper-core/src/linting/spell_check.rs+++ b/harper-core/src/linting/spell_check.rs@@ -225,4 +225,49 @@ mod tests {1,);}++ #[test]+ fn mixing_australian_and_canadian_dialects() {+ assert_lint_count(+ "In summer we sit on the verandah and eat yogourt.",+ SpellCheck::new(FstDictionary::curated(), Dialect::Australian),+ 1,+ );+ }++ #[test]+ fn mixing_canadian_and_australian_dialects() {+ assert_lint_count(+ "In summer we sit on the verandah and eat yogourt.",+ SpellCheck::new(FstDictionary::curated(), Dialect::Canadian),+ 1,+ );+ }++ #[test]+ fn australian_and_canadian_spellings_that_are_not_american() {+ assert_lint_count(+ "In summer we sit on the verandah and eat yogourt.",+ SpellCheck::new(FstDictionary::curated(), Dialect::American),+ 2,+ );+ }++ #[test]+ fn australian_and_canadian_spellings_that_are_not_british() {+ assert_lint_count(+ "In summer we sit on the verandah and eat yogourt.",+ SpellCheck::new(FstDictionary::curated(), Dialect::British),+ 2,+ );+ }++ // #[test]+ // fn australian_labour_vs_labor() {+ // assert_lint_count(+ // "In Australia we write 'labour' but the political party is the 'Labor Party'.",+ // SpellCheck::new(FstDictionary::curated(), Dialect::Australian),+ // 0,+ // )+ // }}