Skip to content

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

test: australia-specific "verandah"

hippietrailb7a642b4807e
diff --git a/harper-core/src/linting/spell_check.rs b/harper-core/src/linting/spell_check.rs
index 35cee76c2..046af1acd 100644
--- a/harper-core/src/linting/spell_check.rs
+++ b/harper-core/src/linting/spell_check.rs
@@ -189,4 +189,40 @@ mod tests {
0,
);
}
+
+ #[test]
+ fn australian_verandah() {
+ assert_lint_count(
+ "Our house has a verandah.",
+ SpellCheck::new(FstDictionary::curated(), Dialect::Australian),
+ 0,
+ );
+ }
+
+ #[test]
+ fn australian_verandah_in_american_dialect() {
+ assert_lint_count(
+ "Our house has a verandah.",
+ SpellCheck::new(FstDictionary::curated(), Dialect::American),
+ 1,
+ );
+ }
+
+ #[test]
+ fn austrlaian_verandah_in_british_dialect() {
+ assert_lint_count(
+ "Our house has a verandah.",
+ SpellCheck::new(FstDictionary::curated(), Dialect::British),
+ 1,
+ );
+ }
+
+ #[test]
+ fn australian_verandah_in_canadian_dialect() {
+ assert_lint_count(
+ "Our house has a verandah.",
+ SpellCheck::new(FstDictionary::curated(), Dialect::Canadian),
+ 1,
+ );
+ }
}