Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
chore: add chocked/chucked/choked full to chock-full linter (#3335)
Andrew Dunbar83a7a8eabe47
diff --git a/harper-core/src/linting/chock_full.rs b/harper-core/src/linting/chock_full.rsindex 2bf71dc34..2fb4a22d8 100644--- a/harper-core/src/linting/chock_full.rs+++ b/harper-core/src/linting/chock_full.rs@@ -12,7 +12,8 @@ pub struct ChockFull {impl Default for ChockFull {fn default() -> Self {Self {- expr: weir_expr_to_expr("[chalk, choke][( ), -]full").unwrap(),+ expr: weir_expr_to_expr("[chalk, choke, chocked, chucked, choked][( ), -]full")+ .unwrap(),}}}@@ -136,4 +137,41 @@ mod tests {"Chock-full of pitfalls; let's consider alternatives.",);}++ #[test]+ fn lower_space_chocked() {+ assert_suggestion_result(+ "The computer was chocked full with 64KB general use RAM (expandable up to 256KB)",+ ChockFull::default(),+ "The computer was chock-full with 64KB general use RAM (expandable up to 256KB)",+ );+ }++ #[test]+ fn lower_space_chucked() {+ assert_suggestion_result(+ "The Mandalorian is chucked full of references and callbacks, mostly to previous Star Wars content.",+ ChockFull::default(),+ "The Mandalorian is chock-full of references and callbacks, mostly to previous Star Wars content.",+ );+ }++ #[test]+ fn lower_space_choked() {+ assert_suggestion_result(+ "I was making decent money, single and choked full of self-importance.",+ ChockFull::default(),+ "I was making decent money, single and chock-full of self-importance.",+ );+ }++ #[test]+ #[ignore = "replace_with_match_case quirks generated 'CHOCK-Full' instead of 'CHOCK-full'"]+ fn upper_space_choked() {+ assert_suggestion_result(+ "Also being a family computer it’s CHOKED full, lots of unnecessary documents no one will sort",+ ChockFull::default(),+ "Also being a family computer it’s CHOCK-full, lots of unnecessary documents no one will sort",+ );+ }}