Add tests for the One and Crate variants
This commit is contained in:
parent
b2c7a52ea8
commit
fd6e11cc57
14
tests/source/5131_crate.rs
Normal file
14
tests/source/5131_crate.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// rustfmt-imports_granularity: Crate
|
||||
|
||||
use foo::a;
|
||||
use foo::a;
|
||||
use foo::b;
|
||||
use foo::b as b2;
|
||||
use foo::b::f;
|
||||
use foo::b::g;
|
||||
use foo::b::g as g2;
|
||||
use foo::c;
|
||||
use foo::d::e;
|
||||
use qux::h;
|
||||
use qux::h as h2;
|
||||
use qux::i;
|
15
tests/source/5131_one.rs
Normal file
15
tests/source/5131_one.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// rustfmt-imports_granularity: One
|
||||
|
||||
pub use foo::x;
|
||||
pub use foo::x as x2;
|
||||
pub use foo::y;
|
||||
use bar::a;
|
||||
use bar::b;
|
||||
use bar::b::f;
|
||||
use bar::b::f as f2;
|
||||
use bar::b::g;
|
||||
use bar::c;
|
||||
use bar::d::e;
|
||||
use bar::d::e as e2;
|
||||
use qux::h;
|
||||
use qux::i;
|
9
tests/target/5131_crate.rs
Normal file
9
tests/target/5131_crate.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// rustfmt-imports_granularity: Crate
|
||||
|
||||
use foo::{
|
||||
a, b, b as b2,
|
||||
b::{f, g, g as g2},
|
||||
c,
|
||||
d::e,
|
||||
};
|
||||
use qux::{h, h as h2, i};
|
12
tests/target/5131_one.rs
Normal file
12
tests/target/5131_one.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// rustfmt-imports_granularity: One
|
||||
|
||||
pub use foo::{x, x as x2, y};
|
||||
use {
|
||||
bar::{
|
||||
a,
|
||||
b::{self, f, g},
|
||||
c,
|
||||
d::{e, e as e2},
|
||||
},
|
||||
qux::{h, i},
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user