-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for ExternalCrate grouping interacting with other options
- Loading branch information
1 parent
b036bb4
commit 6224160
Showing
8 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
tests/source/configs/group_imports/ExternalCrate-merge_imports.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
// rustfmt-imports_granularity: Crate | ||
use chrono::Utc; | ||
use super::update::convert_publish_payload; | ||
|
||
use juniper::{FieldError, FieldResult}; | ||
use uuid::Uuid; | ||
use alloc::alloc::Layout; | ||
|
||
use std::sync::Arc; | ||
use alloc::vec::Vec; | ||
|
||
use broker::database::PooledConnection; | ||
|
||
use super::schema::{Context, Payload}; | ||
use core::f32; | ||
use crate::models::Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
mod test { | ||
use crate::foo::bar; | ||
use std::path; | ||
use crate::foo::bar2; | ||
use uuid::Uuid; | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/source/configs/group_imports/ExternalCrate-no_reorder.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
// rustfmt-reorder_imports: false | ||
|
||
use chrono::Utc; | ||
use super::update::convert_publish_payload; | ||
|
||
use juniper::{FieldError, FieldResult}; | ||
use uuid::Uuid; | ||
use alloc::alloc::Layout; | ||
|
||
use std::sync::Arc; | ||
|
||
use broker::database::PooledConnection; | ||
|
||
use super::schema::{Context, Payload}; | ||
use core::f32; | ||
use crate::models::Event; |
27 changes: 27 additions & 0 deletions
27
tests/source/configs/group_imports/ExternalCrate-non_consecutive.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
use chrono::Utc; | ||
use super::update::convert_publish_payload; | ||
|
||
|
||
|
||
|
||
|
||
use juniper::{FieldError, FieldResult}; | ||
|
||
use uuid::Uuid; | ||
use alloc::alloc::Layout; | ||
|
||
extern crate uuid; | ||
|
||
|
||
|
||
|
||
|
||
use std::sync::Arc; | ||
|
||
|
||
use broker::database::PooledConnection; | ||
|
||
use super::schema::{Context, Payload}; | ||
use core::f32; | ||
use crate::models::Event; |
15 changes: 15 additions & 0 deletions
15
tests/target/configs/group_imports/ExternalCrate-merge_imports.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
// rustfmt-imports_granularity: Crate | ||
use alloc::{alloc::Layout, vec::Vec}; | ||
use broker::database::PooledConnection; | ||
use chrono::Utc; | ||
use core::f32; | ||
use juniper::{FieldError, FieldResult}; | ||
use std::sync::Arc; | ||
use uuid::Uuid; | ||
|
||
use super::{ | ||
schema::{Context, Payload}, | ||
update::convert_publish_payload, | ||
}; | ||
use crate::models::Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
mod test { | ||
use std::path; | ||
use uuid::Uuid; | ||
|
||
use crate::foo::bar; | ||
use crate::foo::bar2; | ||
} |
14 changes: 14 additions & 0 deletions
14
tests/target/configs/group_imports/ExternalCrate-no_reorder.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
// rustfmt-reorder_imports: false | ||
|
||
use chrono::Utc; | ||
use juniper::{FieldError, FieldResult}; | ||
use uuid::Uuid; | ||
use alloc::alloc::Layout; | ||
use std::sync::Arc; | ||
use broker::database::PooledConnection; | ||
use core::f32; | ||
|
||
use super::update::convert_publish_payload; | ||
use super::schema::{Context, Payload}; | ||
use crate::models::Event; |
16 changes: 16 additions & 0 deletions
16
tests/target/configs/group_imports/ExternalCrate-non_consecutive.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// rustfmt-group_imports: ExternalCrate | ||
use alloc::alloc::Layout; | ||
use chrono::Utc; | ||
use juniper::{FieldError, FieldResult}; | ||
use uuid::Uuid; | ||
|
||
use super::update::convert_publish_payload; | ||
|
||
extern crate uuid; | ||
|
||
use broker::database::PooledConnection; | ||
use core::f32; | ||
use std::sync::Arc; | ||
|
||
use super::schema::{Context, Payload}; | ||
use crate::models::Event; |