Skip to content

Commit d7a57d3

Browse files
committed
Update tests
1 parent 0b38ac4 commit d7a57d3

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

tests/source/skip.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,37 @@ fn issue1346() {
2929
}
3030
}))
3131
}
32+
33+
fn skip_on_statements() {
34+
// Semi
35+
#[cfg_attr(rustfmt, rustfmt_skip)]
36+
foo(
37+
1, 2, 3, 4,
38+
1, 2,
39+
1, 2, 3,
40+
);
41+
42+
// Local
43+
#[cfg_attr(rustfmt, rustfmt_skip)]
44+
let x = foo( a, b , c);
45+
46+
// Item
47+
#[cfg_attr(rustfmt, rustfmt_skip)]
48+
use foobar ;
49+
50+
// Mac
51+
#[cfg_attr(rustfmt, rustfmt_skip)]
52+
vec![
53+
1, 2, 3, 4,
54+
1, 2, 3, 4,
55+
1, 2, 3, 4,
56+
1, 2, 3,
57+
1,
58+
1, 2,
59+
1,
60+
];
61+
62+
// Expr
63+
#[cfg_attr(rustfmt, rustfmt_skip)]
64+
foo( a, b , c)
65+
}

tests/target/skip.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,37 @@ fn issue1346() {
2929
}
3030
}))
3131
}
32+
33+
fn skip_on_statements() {
34+
// Semi
35+
#[cfg_attr(rustfmt, rustfmt_skip)]
36+
foo(
37+
1, 2, 3, 4,
38+
1, 2,
39+
1, 2, 3,
40+
);
41+
42+
// Local
43+
#[cfg_attr(rustfmt, rustfmt_skip)]
44+
let x = foo( a, b , c);
45+
46+
// Item
47+
#[cfg_attr(rustfmt, rustfmt_skip)]
48+
use foobar ;
49+
50+
// Mac
51+
#[cfg_attr(rustfmt, rustfmt_skip)]
52+
vec![
53+
1, 2, 3, 4,
54+
1, 2, 3, 4,
55+
1, 2, 3, 4,
56+
1, 2, 3,
57+
1,
58+
1, 2,
59+
1,
60+
];
61+
62+
// Expr
63+
#[cfg_attr(rustfmt, rustfmt_skip)]
64+
foo( a, b , c)
65+
}

0 commit comments

Comments
 (0)