tests: add normalize_doc_attributes config tests (#3630)
This commit is contained in:
parent
4b102fde2c
commit
aa0c9dd212
13
tests/source/configs/normalize_doc_attributes/false.rs
Normal file
13
tests/source/configs/normalize_doc_attributes/false.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// rustfmt-normalize_doc_attributes: false
|
||||
// Normalize doc attributes
|
||||
|
||||
#![doc = " Example documentation"]
|
||||
|
||||
#[doc = " Example item documentation"]
|
||||
pub enum Foo {}
|
||||
|
||||
#[doc = " Lots of space"]
|
||||
pub enum Bar {}
|
||||
|
||||
#[doc = "no leading space"]
|
||||
pub mod FooBar {}
|
13
tests/source/configs/normalize_doc_attributes/true.rs
Normal file
13
tests/source/configs/normalize_doc_attributes/true.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// rustfmt-normalize_doc_attributes: true
|
||||
// Normalize doc attributes
|
||||
|
||||
#![doc = " Example documentation"]
|
||||
|
||||
#[doc = " Example item documentation"]
|
||||
pub enum Foo {}
|
||||
|
||||
#[doc = " Lots of space"]
|
||||
pub enum Bar {}
|
||||
|
||||
#[doc = "no leading space"]
|
||||
pub mod FooBar {}
|
13
tests/target/configs/normalize_doc_attributes/false.rs
Normal file
13
tests/target/configs/normalize_doc_attributes/false.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// rustfmt-normalize_doc_attributes: false
|
||||
// Normalize doc attributes
|
||||
|
||||
#![doc = " Example documentation"]
|
||||
|
||||
#[doc = " Example item documentation"]
|
||||
pub enum Foo {}
|
||||
|
||||
#[doc = " Lots of space"]
|
||||
pub enum Bar {}
|
||||
|
||||
#[doc = "no leading space"]
|
||||
pub mod FooBar {}
|
13
tests/target/configs/normalize_doc_attributes/true.rs
Normal file
13
tests/target/configs/normalize_doc_attributes/true.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// rustfmt-normalize_doc_attributes: true
|
||||
// Normalize doc attributes
|
||||
|
||||
//! Example documentation
|
||||
|
||||
/// Example item documentation
|
||||
pub enum Foo {}
|
||||
|
||||
/// Lots of space
|
||||
pub enum Bar {}
|
||||
|
||||
///no leading space
|
||||
pub mod FooBar {}
|
Loading…
x
Reference in New Issue
Block a user