Add tests for nested imports
This commit is contained in:
parent
97fd517593
commit
d4a569848e
@ -76,3 +76,14 @@ fn test() {
|
||||
// We shouldn't remove imports which have attributes attached (#1858)
|
||||
#[cfg(unix)]
|
||||
use self::unix::{};
|
||||
|
||||
// nested imports
|
||||
use foo::{a, bar::{baz, qux, xxxxxxxxxxx, yyyyyyyyyyyyy, zzzzzzzzzzzzzzzz, foo::{a, b, cxxxxxxxxxxxxx, yyyyyyyyyyyyyy, zzzzzzzzzzzzzzzz}}, b, boo, c,};
|
||||
|
||||
use fooo::{baar::{foobar::{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy, zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz}}, z, bar, bar::*, x, y};
|
||||
|
||||
// nested imports with a single sub-tree.
|
||||
use a::{b::{c::*}};
|
||||
use a::{b::{c::{}}};
|
||||
use a::{b::{c::d}};
|
||||
use a::{b::{c::{xxx, yyy, zzz}}};
|
||||
|
@ -71,3 +71,18 @@ fn test() {
|
||||
// We shouldn't remove imports which have attributes attached (#1858)
|
||||
#[cfg(unix)]
|
||||
use self::unix::{};
|
||||
|
||||
// nested imports
|
||||
use foo::{a, b, boo, c,
|
||||
bar::{baz, qux, xxxxxxxxxxx, yyyyyyyyyyyyy, zzzzzzzzzzzzzzzz,
|
||||
foo::{a, b, cxxxxxxxxxxxxx, yyyyyyyyyyyyyy, zzzzzzzzzzzzzzzz}}};
|
||||
|
||||
use fooo::{bar, x, y, z,
|
||||
baar::foobar::{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
|
||||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz},
|
||||
bar::*};
|
||||
|
||||
// nested imports with a single sub-tree.
|
||||
use a::b::c::*;
|
||||
use a::b::c::d;
|
||||
use a::b::c::{xxx, yyy, zzz};
|
||||
|
Loading…
Reference in New Issue
Block a user