Skip to content

Commit

Permalink
Use the full file path for platform agnostic snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Oct 16, 2023
1 parent 5e73cc2 commit 13d7547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_cli/tests/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ format = "json"
)?;

insta::with_settings!({filters => vec![
(&*regex::escape(tempdir.path().to_str().unwrap()), "[TMPDIR]"),
(&*regex::escape(ruff_toml.to_str().unwrap()), "[RUFF-TOML-PATH]"),
]}, {
assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
.args(["check", "--select", "F401", "--no-cache", "--config"])
Expand All @@ -172,7 +172,7 @@ format = "json"
----- stderr -----
ruff failed
Cause: Failed to parse `[TMPDIR]/ruff.toml`: TOML parse error at line 2, column 10
Cause: Failed to parse `[RUFF-TOML-PATH]`: TOML parse error at line 2, column 10
|
2 | format = "json"
| ^^^^^^
Expand Down

0 comments on commit 13d7547

Please sign in to comment.