Skip to content

Commit

Permalink
tests: add normalize_doc_attributes config tests (rust-lang#3630)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright authored and topecongiro committed Jun 16, 2019
1 parent 4b102fd commit aa0c9dd
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/source/configs/normalize_doc_attributes/false.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 0 deletions tests/source/configs/normalize_doc_attributes/true.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 0 deletions tests/target/configs/normalize_doc_attributes/false.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 0 deletions tests/target/configs/normalize_doc_attributes/true.rs
Original file line number Diff line number Diff line change
@@ -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 {}

0 comments on commit aa0c9dd

Please sign in to comment.