mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-15 10:31:30 +00:00
remove example formatting test from test_syntax
This commit is contained in:
parent
ae9e244548
commit
68f4aabbce
1 changed files with 0 additions and 26 deletions
|
|
@ -5992,32 +5992,6 @@ mod test_fmt {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
/// Test that everything under examples/ is formatted correctly
|
|
||||||
/// If this test fails on your diff, it probably means you need to re-format the examples.
|
|
||||||
/// Try this:
|
|
||||||
/// `cargo run -- format $(find examples -name \*.roc)`
|
|
||||||
fn test_fmt_examples() {
|
|
||||||
let mut count = 0;
|
|
||||||
let mut root = workspace_root();
|
|
||||||
root.push("examples");
|
|
||||||
for entry in walkdir::WalkDir::new(&root) {
|
|
||||||
let entry = entry.unwrap();
|
|
||||||
let path = entry.path();
|
|
||||||
if path.extension() == Some(std::ffi::OsStr::new("roc")) {
|
|
||||||
count += 1;
|
|
||||||
let src = std::fs::read_to_string(path).unwrap();
|
|
||||||
println!("Now trying to format {}", path.display());
|
|
||||||
module_formats_same(&src);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assert!(
|
|
||||||
count > 0,
|
|
||||||
"Expecting to find at least 1 .roc file to format under {}",
|
|
||||||
root.display()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
/// Test that builtins are formatted correctly
|
/// Test that builtins are formatted correctly
|
||||||
/// If this test fails on your diff, it probably means you need to re-format a builtin.
|
/// If this test fails on your diff, it probably means you need to re-format a builtin.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue