Update tests

This commit is contained in:
topecongiro 2017-05-22 08:50:46 +09:00
parent 77a2e9858b
commit dc8d3aa23a
3 changed files with 17 additions and 1 deletions

View File

@ -2106,7 +2106,7 @@ fn count_line_breaks(src: &str) -> usize {
// Expression did not fit on the same line as the identifier or is // Expression did not fit on the same line as the identifier or is
// at least three lines big. Try splitting the line and see // at least three lines big. Try splitting the line and see
// if that works better. // if that works better.
let new_shape = try_opt!(shape.block_left(context.config.tab_spaces)); let new_shape = try_opt!(shape.block_left(context.config.tab_spaces()));
let new_rhs = ex.rewrite(context, new_shape); let new_rhs = ex.rewrite(context, new_shape);
// FIXME: DRY! // FIXME: DRY!

View File

@ -41,6 +41,12 @@ fn main() {
vec![a, b; c]; vec![a, b; c];
vec![a; b, c]; vec![a; b, c];
vec![a; (|x| { let y = x + 1; let z = y + 1; z })(2)];
vec![a; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx];
vec![a; unsafe {
x + 1
}];
unknown_bracket_macro__comma_should_not_be_stripped![ unknown_bracket_macro__comma_should_not_be_stripped![
a, a,
]; ];

View File

@ -45,6 +45,16 @@ fn main() {
vec![a, b; c]; vec![a, b; c];
vec![a; b, c]; vec![a; b, c];
vec![a;
(|x| {
let y = x + 1;
let z = y + 1;
z
})(2)];
vec![a;
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx];
vec![a; unsafe { x + 1 }];
unknown_bracket_macro__comma_should_not_be_stripped![ unknown_bracket_macro__comma_should_not_be_stripped![
a, a,
]; ];