This commit is contained in:
Elijah Potter
2025-11-26 09:55:17 -07:00
committed by GitHub
parent c4f04faa41
commit 230e142404
5 changed files with 15 additions and 1 deletions

View File

@@ -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

View File

@@ -0,0 +1,3 @@
---Starting with something capitalized, but without dot at the end
---@type table<string, string>
local f = {} -- ending with a dot.

View File

@@ -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,
);
}
}

View File

@@ -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);

View File

@@ -0,0 +1 @@
In foobar, apple is a fruit, and "beer" is not a fruit.