Skip to content

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

test(core): confirm that #720 is no longer present

Elijah Potter6890f716dd5a
diff --git a/harper-core/src/linting/then_than.rs b/harper-core/src/linting/then_than.rs
index 6328eb8c1..33487b036 100644
--- a/harper-core/src/linting/then_than.rs
+++ b/harper-core/src/linting/then_than.rs
@@ -206,4 +206,86 @@ mod tests {
0,
);
}
+
+ #[test]
+ fn issue_720_school_but_then_his() {
+ assert_lint_count(
+ "She loved the atmosphere of the school but then his argument is that it lacks proper resources for students.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "The teacher praised the efforts of the school but then his argument is that the curriculum needs to be updated.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "They were excited about the new program at school but then his argument is that it won't be effective without proper training.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "The community supported the school but then his argument is that funding is still a major issue.",
+ ThenThan::default(),
+ 0,
+ );
+ }
+
+ #[test]
+ fn issue_720_so_then_these_resistors() {
+ assert_lint_count(
+ "So then these resistors are connected up in parallel to reduce the overall resistance.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "So then these resistors are connected up to ensure the current flows properly.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "So then these resistors are connected up to achieve the desired voltage drop.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "So then these resistors are connected up to demonstrate the principles of series and parallel circuits.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "So then these resistors are connected up to optimize the circuit's performance.",
+ ThenThan::default(),
+ 0,
+ );
+ }
+
+ #[test]
+ fn issue_720_yes_so_then_sorry() {
+ assert_lint_count(
+ "Yes so then sorry you didn't receive the memo about the meeting changes.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "Yes so then sorry you had to wait so long for a response from our team.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "Yes so then sorry you felt left out during the discussion; we value your input.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "Yes so then sorry you missed the deadline; we can discuss an extension.",
+ ThenThan::default(),
+ 0,
+ );
+ assert_lint_count(
+ "Yes so then sorry you encountered issues with the software; let me help you troubleshoot.",
+ ThenThan::default(),
+ 0,
+ );
+ }
}