diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2021-11-24 13:16:10 -0800 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2021-11-24 13:16:10 -0800 |
| commit | 2e0bc33594118179bb4b3e12a86a6d74b7baed4a (patch) | |
| tree | 6e4da9a3f65ffb7d16a3d1dc4e812f6ba65e27cc | |
| parent | 8a48b376d559f26a9b8fc1f1d597acb0bc0a51f9 (diff) | |
| download | rust-2e0bc33594118179bb4b3e12a86a6d74b7baed4a.tar.gz rust-2e0bc33594118179bb4b3e12a86a6d74b7baed4a.zip | |
rustdoc: Add test for mixing doc comments and attrs
This is a step toward adding more test coverage to make it easier to remove the distinction between collapsed and uncollapsed doc values.
| -rw-r--r-- | src/test/rustdoc/mixing-doc-comments-and-attrs.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/rustdoc/mixing-doc-comments-and-attrs.rs b/src/test/rustdoc/mixing-doc-comments-and-attrs.rs new file mode 100644 index 00000000000..c26d3a31987 --- /dev/null +++ b/src/test/rustdoc/mixing-doc-comments-and-attrs.rs @@ -0,0 +1,26 @@ +#![crate_name = "foo"] + +// @has 'foo/struct.S1.html' +// @count - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p' \ +// 1 +// @has - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p[1]' \ +// 'Hello world! Goodbye! Hello again!' + +#[doc = "Hello world!\n\n"] +/// Goodbye! +#[doc = " Hello again!\n"] +pub struct S1; + +// @has 'foo/struct.S2.html' +// @count - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p' \ +// 2 +// @has - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p[1]' \ +// 'Hello world!' +// @has - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p[2]' \ +// 'Goodbye! Hello again!' + +/// Hello world! +/// +#[doc = "Goodbye!"] +/// Hello again! +pub struct S2; |
