mirror of
https://github.com/Automattic/harper.git
synced 2025-12-05 19:26:55 -06:00
@@ -61,6 +61,7 @@ create_test!(ignore_shebang_3.sh, 0);
|
||||
create_test!(ignore_shebang_4.sh, 1);
|
||||
create_test!(common.mill, 1);
|
||||
create_test!(basic_kotlin.kt, 0);
|
||||
create_test!(issue_1097.lua, 0);
|
||||
create_test!(basic.clj, 12);
|
||||
|
||||
// Checks that some comments are masked out
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
---Starting with something capitalized, but without dot at the end
|
||||
---@type table<string, string>
|
||||
local f = {} -- ending with a dot.
|
||||
@@ -118,7 +118,7 @@ impl Linter for CommaFixes {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::CommaFixes;
|
||||
use crate::linting::tests::{assert_lint_count, assert_suggestion_result};
|
||||
use crate::linting::tests::{assert_lint_count, assert_no_lints, assert_suggestion_result};
|
||||
|
||||
#[test]
|
||||
fn allows_english_comma_atomic() {
|
||||
@@ -203,4 +203,12 @@ mod tests {
|
||||
fn doesnt_correct_comma_between_non_english_tokens() {
|
||||
assert_lint_count("严禁采摘花、 果、叶,挖掘树根、草药!", CommaFixes, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_2233() {
|
||||
assert_no_lints(
|
||||
"In foobar, apple is a fruit, and \"beer\" is not a fruit.",
|
||||
CommaFixes,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ 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);
|
||||
create_test!(issue_1873.md, 0, Dialect::British);
|
||||
create_test!(issue_2233.md, 0, Dialect::American);
|
||||
// It just matters that it is > 1
|
||||
create_test!(issue_2151.md, 4, Dialect::British);
|
||||
|
||||
|
||||
1
harper-core/tests/test_sources/issue_2233.md
Normal file
1
harper-core/tests/test_sources/issue_2233.md
Normal file
@@ -0,0 +1 @@
|
||||
In foobar, apple is a fruit, and "beer" is not a fruit.
|
||||
Reference in New Issue
Block a user