From 33cbf8908d4cf1c971128ee35e7bd2ea50225b63 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 6 Feb 2022 22:21:09 +0100 Subject: Add test for block doc comments horizontal trim --- src/test/rustdoc-ui/block-doc-comment.rs | 16 ++++++++++++++++ src/test/rustdoc-ui/block-doc-comment.stdout | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 src/test/rustdoc-ui/block-doc-comment.rs create mode 100644 src/test/rustdoc-ui/block-doc-comment.stdout (limited to 'src/test') diff --git a/src/test/rustdoc-ui/block-doc-comment.rs b/src/test/rustdoc-ui/block-doc-comment.rs new file mode 100644 index 00000000000..c60dfa3f951 --- /dev/null +++ b/src/test/rustdoc-ui/block-doc-comment.rs @@ -0,0 +1,16 @@ +// check-pass +// compile-flags:--test + +// This test ensures that no code block is detected in the doc comments. + +pub mod Wormhole { + /** # Returns + * + */ + pub fn foofoo() {} + /** + * # Returns + * + */ + pub fn barbar() {} +} diff --git a/src/test/rustdoc-ui/block-doc-comment.stdout b/src/test/rustdoc-ui/block-doc-comment.stdout new file mode 100644 index 00000000000..e5c27bebbdb --- /dev/null +++ b/src/test/rustdoc-ui/block-doc-comment.stdout @@ -0,0 +1,5 @@ + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + -- cgit 1.4.1-3-g733a5 From a476ec8bd0b1925d349383110b75ff51567d7534 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 6 Feb 2022 22:51:47 +0100 Subject: Update rustdoc test --- src/test/rustdoc/strip-block-doc-comments-stars.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test') diff --git a/src/test/rustdoc/strip-block-doc-comments-stars.rs b/src/test/rustdoc/strip-block-doc-comments-stars.rs index ed2297b4fac..ea28d84f1ff 100644 --- a/src/test/rustdoc/strip-block-doc-comments-stars.rs +++ b/src/test/rustdoc/strip-block-doc-comments-stars.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -// The goal of this test is to answer that it won't be generated as a list because +// The goal of this test is to ensure that it won't be generated as a list because // block doc comments can have their lines starting with a star. // @has foo/fn.foo.html -- cgit 1.4.1-3-g733a5