Skip to content

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

test: add 2 mixed-case unit tests

hippietrail91e004a1c6de
diff --git a/harper-core/src/linting/modal_of.rs b/harper-core/src/linting/modal_of.rs
index a5d897fa0..e5b1291e6 100644
--- a/harper-core/src/linting/modal_of.rs
+++ b/harper-core/src/linting/modal_of.rs
@@ -289,4 +289,18 @@ mod tests {
fn doesnt_catch_to_take_on_the_full_might_of_nato() {
assert_lint_count("To take on the full might of NATO.", ModalOf::default(), 0);
}
+
+ #[test]
+ fn doesnt_catch_mixed_case_of_course() {
+ assert_lint_count(
+ "... for now you could of Course put ...",
+ ModalOf::default(),
+ 0,
+ );
+ }
+
+ #[test]
+ fn catches_mixed_case_could_of_put() {
+ assert_lint_count("... for now you could of Put ...", ModalOf::default(), 1);
+ }
}