tests: add normalize_doc_attributes config tests (#3630)

This commit is contained in:
Caleb Cartwright 2019-06-16 09:46:25 -05:00 committed by Seiichi Uchida
parent 4b102fde2c
commit aa0c9dd212
4 changed files with 52 additions and 0 deletions

View 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 {}

View 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 {}

View 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 {}

View 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 {}