mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
Check newline ending on contents directly (#365)
This commit is contained in:
parent
5ccd907398
commit
d0e1612507
4 changed files with 49 additions and 30 deletions
|
@ -363,6 +363,18 @@ mod tests {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn w292_2() -> Result<()> {
|
||||
let mut checks = check_path(
|
||||
Path::new("./resources/test/fixtures/W292_2.py"),
|
||||
&settings::Settings::for_rule(CheckCode::W292),
|
||||
&fixer::Mode::Generate,
|
||||
)?;
|
||||
checks.sort_by_key(|check| check.location);
|
||||
insta::assert_yaml_snapshot!(checks);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn f401() -> Result<()> {
|
||||
let mut checks = check_path(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue