From: Caleb Cartwright Date: Sun, 16 Jun 2019 14:46:25 +0000 (-0500) Subject: tests: add normalize_doc_attributes config tests (#3630) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=aa0c9dd212a051e2c3779cee23c4fd259f26c15d;p=rust.git tests: add normalize_doc_attributes config tests (#3630) --- diff --git a/tests/source/configs/normalize_doc_attributes/false.rs b/tests/source/configs/normalize_doc_attributes/false.rs new file mode 100644 index 00000000000..f8eb64273c3 --- /dev/null +++ b/tests/source/configs/normalize_doc_attributes/false.rs @@ -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 {} diff --git a/tests/source/configs/normalize_doc_attributes/true.rs b/tests/source/configs/normalize_doc_attributes/true.rs new file mode 100644 index 00000000000..894c00a4dc0 --- /dev/null +++ b/tests/source/configs/normalize_doc_attributes/true.rs @@ -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 {} diff --git a/tests/target/configs/normalize_doc_attributes/false.rs b/tests/target/configs/normalize_doc_attributes/false.rs new file mode 100644 index 00000000000..f8eb64273c3 --- /dev/null +++ b/tests/target/configs/normalize_doc_attributes/false.rs @@ -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 {} diff --git a/tests/target/configs/normalize_doc_attributes/true.rs b/tests/target/configs/normalize_doc_attributes/true.rs new file mode 100644 index 00000000000..fadab985bea --- /dev/null +++ b/tests/target/configs/normalize_doc_attributes/true.rs @@ -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 {}