forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |