Skip to content

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

test(core): ensure #2054 is no longer a problem (#2168)

Elijah Potter08675f287db4
diff --git a/harper-core/src/linting/orthographic_consistency.rs b/harper-core/src/linting/orthographic_consistency.rs
index aa7fa3bd6..c5655643d 100644
--- a/harper-core/src/linting/orthographic_consistency.rs
+++ b/harper-core/src/linting/orthographic_consistency.rs
@@ -82,7 +82,7 @@ impl ExprLinter for OrthographicConsistency {
"The canonical dictionary spelling is `{}`.",
canonical.iter().collect::<String>()
),
- priority: 127,
+ priority: 31,
});
}
diff --git a/harper-core/tests/run_tests.rs b/harper-core/tests/run_tests.rs
index 96b6e14c0..1206d2c9f 100644
--- a/harper-core/tests/run_tests.rs
+++ b/harper-core/tests/run_tests.rs
@@ -88,6 +88,8 @@ create_test!(hex_basic_dirty.md, 1, Dialect::American);
create_test!(misc_closed_compound_clean.md, 0, Dialect::American);
create_test!(yogurt_british_clean.md, 0, Dialect::British);
create_test!(issue_1581.md, 0, Dialect::British);
+create_test!(issue_2054.md, 6, Dialect::British);
+create_test!(issue_2054_clean.md, 0, Dialect::British);
// It just matters that it is > 1
create_test!(issue_2151.md, 4, Dialect::British);
diff --git a/harper-core/tests/test_sources/issue_2054.md b/harper-core/tests/test_sources/issue_2054.md
new file mode 100644
index 000000000..a7053c793
--- /dev/null
+++ b/harper-core/tests/test_sources/issue_2054.md
@@ -0,0 +1,2 @@
+I really enjoy a good ui or gui.
+When developer put time and effort into a good ux, I feel so much more productive.
diff --git a/harper-core/tests/test_sources/issue_2054_clean.md b/harper-core/tests/test_sources/issue_2054_clean.md
new file mode 100644
index 000000000..edf8bc9a6
--- /dev/null
+++ b/harper-core/tests/test_sources/issue_2054_clean.md
@@ -0,0 +1,2 @@
+I really enjoy a good UI or GUI.
+When developer put time and effort into a good UX, I feel so much more productive.
diff --git a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
index aadc922c6..3b48111f8 100644
--- a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
+++ b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
@@ -1223,7 +1223,7 @@ Message: |
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
692 | below!” (a loud crash)—“Now, who did that?—It was Bill, I fancy—Who’s to go down
| ^~~~~ The canonical dictionary spelling is `who's`.
@@ -1983,7 +1983,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
1582 | “Who’s making personal remarks now?” the Hatter asked triumphantly.
| ^~~~~ The canonical dictionary spelling is `who's`.
diff --git a/harper-core/tests/text/linters/Difficult sentences.snap.yml b/harper-core/tests/text/linters/Difficult sentences.snap.yml
index cfba7975d..c459abbd6 100644
--- a/harper-core/tests/text/linters/Difficult sentences.snap.yml
+++ b/harper-core/tests/text/linters/Difficult sentences.snap.yml
@@ -56,7 +56,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
126 | Who's for ice-cream?
| ^~~~~ The canonical dictionary spelling is `who's`.
@@ -74,7 +74,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
166 | You can't get all your news from the Internet.
| ^~~~ The canonical dictionary spelling is `news`.
diff --git a/harper-core/tests/text/linters/The Constitution of the United States.snap.yml b/harper-core/tests/text/linters/The Constitution of the United States.snap.yml
index a3140e7db..9a840d11c 100644
--- a/harper-core/tests/text/linters/The Constitution of the United States.snap.yml
+++ b/harper-core/tests/text/linters/The Constitution of the United States.snap.yml
@@ -882,7 +882,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
338 | #### SubSection. 1.
| ^~~~~~~~~~ The canonical dictionary spelling is `subsection`.
@@ -1003,7 +1003,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
388 | #### SubSection. 2
| ^~~~~~~~~~ The canonical dictionary spelling is `subsection`.
@@ -1057,7 +1057,7 @@ Message: |
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
406 | #### SubSection 3.
| ^~~~~~~~~~ The canonical dictionary spelling is `subsection`.
@@ -1226,7 +1226,7 @@ Message: |
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
446 | #### SubSection 4.
| ^~~~~~~~~~ The canonical dictionary spelling is `subsection`.
@@ -1297,7 +1297,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
460 | #### SubSection 5.
| ^~~~~~~~~~ The canonical dictionary spelling is `subsection`.
diff --git a/harper-core/tests/text/linters/The Great Gatsby.snap.yml b/harper-core/tests/text/linters/The Great Gatsby.snap.yml
index a0576e06f..ac7919583 100644
--- a/harper-core/tests/text/linters/The Great Gatsby.snap.yml
+++ b/harper-core/tests/text/linters/The Great Gatsby.snap.yml
@@ -279,7 +279,7 @@ Message: |
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
98 | of very solemn and obvious editorials for the Yale News—and now I was going to
| ^~~~ The canonical dictionary spelling is `news`.
@@ -998,7 +998,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
747 | “I’ll meet you by the news-stand on the lower level.”
| ^~~~ The canonical dictionary spelling is `news`.
@@ -1040,7 +1040,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
772 | her rather wide hips as Tom helped her to the platform in New York. At the
773 | news-stand she bought a copy of Town Tattle and a moving-picture magazine, and
@@ -1583,7 +1583,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
1210 | rhythm obligingly for her, and there is a burst of chatter as the erroneous news
| ^~~~ The canonical dictionary spelling is `news`.
@@ -4185,7 +4185,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
2776 | ecstatic patron of recurrent light, and repeated the news to Daisy. “What do you
| ^~~~ The canonical dictionary spelling is `news`.
@@ -4367,7 +4367,7 @@ Message: |
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
2905 | “Who’s this?”
| ^~~~~ The canonical dictionary spelling is `who's`.
@@ -4467,7 +4467,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
3019 | become authorities upon his past, had increased all summer until he fell just
3020 | short of being news. Contemporary legends such as the “underground pipe-line to
@@ -4923,7 +4923,7 @@ Suggest:
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
3409 | Her glance left me and sought the lighted top of the steps, where “Three o’Clock
| ^~~~~~~ The canonical dictionary spelling is `o'clock`.
@@ -7274,7 +7274,7 @@ Message: |
-Lint: Capitalization (127 priority)
+Lint: Capitalization (31 priority)
Message: |
5251 | Gatsby’s side, and alone. From the moment I telephoned news of the catastrophe
| ^~~~ The canonical dictionary spelling is `news`.