1
Fork 0

Rollup merge of #119853 - klensy:rustfmt-ignore, r=cuviper

rustfmt.toml: don't ignore just any tests path, only root one

Previously ignored any `tests` path, now only /tests at repo root.

For reference, https://git-scm.com/docs/gitignore#_pattern_format
This commit is contained in:
Matthias Krüger 2024-01-11 19:42:53 +01:00 committed by GitHub
commit b3d15ebb08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 126 additions and 95 deletions

View file

@ -5,7 +5,8 @@ use termcolor::{BufferWriter, ColorChoice};
use super::*;
const INPUT: &str = include_str!("input.md");
const OUTPUT_PATH: &[&str] = &[env!("CARGO_MANIFEST_DIR"), "src","markdown","tests","output.stdout"];
const OUTPUT_PATH: &[&str] =
&[env!("CARGO_MANIFEST_DIR"), "src", "markdown", "tests", "output.stdout"];
const TEST_WIDTH: usize = 80;
@ -34,7 +35,7 @@ quis dolor non venenatis. Aliquam ut. ";
fn test_wrapping_write() {
WIDTH.with(|w| w.set(TEST_WIDTH));
let mut buf = BufWriter::new(Vec::new());
let txt = TXT.replace("-\n","-").replace("_\n","_").replace('\n', " ").replace(" ", "");
let txt = TXT.replace("-\n", "-").replace("_\n", "_").replace('\n', " ").replace(" ", "");
write_wrapping(&mut buf, &txt, 0, None).unwrap();
write_wrapping(&mut buf, &txt, 4, None).unwrap();
write_wrapping(