core: rustfmt splits on fn_call_width, not max_width
Three assertions I had collapsed to one line because they fit inside max_width=100. rustfmt's fn_call_width is 60 and applies to the ARGUMENT list, so a call can sit well under the line limit and still be split vertically. Clippy and the tests were already green; this is the formatter only.
This commit is contained in:
@@ -294,7 +294,10 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn items_basic() {
|
fn items_basic() {
|
||||||
let body = "shopping\n\n- [ ] milk\n- [x] eggs";
|
let body = "shopping\n\n- [ ] milk\n- [x] eggs";
|
||||||
assert_eq!(extract_items(body), vec![item("milk", false), item("eggs", true)]);
|
assert_eq!(
|
||||||
|
extract_items(body),
|
||||||
|
vec![item("milk", false), item("eggs", true)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -324,7 +327,10 @@ mod tests {
|
|||||||
fn items_accept_star_bullets_and_indentation() {
|
fn items_accept_star_bullets_and_indentation() {
|
||||||
// `*` because markdown.ts already takes it for a plain bullet.
|
// `*` because markdown.ts already takes it for a plain bullet.
|
||||||
let body = "* [ ] star\n - [x] indented";
|
let body = "* [ ] star\n - [x] indented";
|
||||||
assert_eq!(extract_items(body), vec![item("star", false), item("indented", true)]);
|
assert_eq!(
|
||||||
|
extract_items(body),
|
||||||
|
vec![item("star", false), item("indented", true)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -350,7 +356,10 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn checking_addresses_items_not_lines() {
|
fn checking_addresses_items_not_lines() {
|
||||||
let body = "note\n- [ ] a\nprose\n- [ ] b";
|
let body = "note\n- [ ] a\nprose\n- [ ] b";
|
||||||
assert_eq!(set_item_checked(body, 1, true), "note\n- [ ] a\nprose\n- [x] b");
|
assert_eq!(
|
||||||
|
set_item_checked(body, 1, true),
|
||||||
|
"note\n- [ ] a\nprose\n- [x] b"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user