diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-01-14 10:02:27 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-01-31 15:15:59 -0500 |
| commit | ea2b1b035b3aa2e0e464dabb0e46f6c2092d357f (patch) | |
| tree | b98972423c076d962517f0b6e5afab67509a6a51 /src/test/rustdoc | |
| parent | d30b99f9c23f8e1d6ef993cc94da96510ad709b3 (diff) | |
| download | rust-ea2b1b035b3aa2e0e464dabb0e46f6c2092d357f.tar.gz rust-ea2b1b035b3aa2e0e464dabb0e46f6c2092d357f.zip | |
rustdoc: wrap stability tags in colored spans
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/deprecated.rs | 6 | ||||
| -rw-r--r-- | src/test/rustdoc/inline_cross/macros.rs | 3 | ||||
| -rw-r--r-- | src/test/rustdoc/internal.rs | 6 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-32374.rs | 7 |
4 files changed, 15 insertions, 7 deletions
diff --git a/src/test/rustdoc/deprecated.rs b/src/test/rustdoc/deprecated.rs index ca3f380ed28..74bd94548e0 100644 --- a/src/test/rustdoc/deprecated.rs +++ b/src/test/rustdoc/deprecated.rs @@ -1,7 +1,9 @@ #![feature(deprecated)] -// @matches deprecated/index.html '//*[@class="docblock-short"]' \ -// '^\[Deprecated\] Deprecated docs' +// @has deprecated/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' \ +// 'Deprecated' +// @has - '//*[@class="docblock-short"]' 'Deprecated docs' + // @has deprecated/struct.S.html '//*[@class="stab deprecated"]' \ // 'Deprecated since 1.0.0: text' /// Deprecated docs diff --git a/src/test/rustdoc/inline_cross/macros.rs b/src/test/rustdoc/inline_cross/macros.rs index 4e370062385..f9bf982659e 100644 --- a/src/test/rustdoc/inline_cross/macros.rs +++ b/src/test/rustdoc/inline_cross/macros.rs @@ -7,7 +7,8 @@ extern crate macros; -// @has foo/index.html '//*[@class="docblock-short"]' '[Deprecated] [Experimental]' +// @has foo/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' Deprecated +// @has - '//*[@class="docblock-short"]/span[@class="stab unstable"]' Experimental // @has foo/macro.my_macro.html // @has - '//*[@class="docblock"]' 'docs for my_macro' diff --git a/src/test/rustdoc/internal.rs b/src/test/rustdoc/internal.rs index ba58da138a8..2cb7c472cc8 100644 --- a/src/test/rustdoc/internal.rs +++ b/src/test/rustdoc/internal.rs @@ -1,7 +1,9 @@ // compile-flags: -Z force-unstable-if-unmarked -// @matches internal/index.html '//*[@class="docblock-short"]' \ -// '^\[Internal\] Docs' +// @matches internal/index.html '//*[@class="docblock-short"]/span[@class="stab internal"]' \ +// 'Internal' +// @matches - '//*[@class="docblock-short"]' 'Docs' + // @has internal/struct.S.html '//*[@class="stab internal"]' \ // 'This is an internal compiler API. (rustc_private)' /// Docs diff --git a/src/test/rustdoc/issue-32374.rs b/src/test/rustdoc/issue-32374.rs index 58876a1aa11..7babfaf6060 100644 --- a/src/test/rustdoc/issue-32374.rs +++ b/src/test/rustdoc/issue-32374.rs @@ -3,8 +3,11 @@ #![unstable(feature="test", issue = "32374")] -// @matches issue_32374/index.html '//*[@class="docblock-short"]' \ -// '^\[Deprecated\] \[Experimental\] Docs' +// @matches issue_32374/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' \ +// 'Deprecated' +// @matches issue_32374/index.html '//*[@class="docblock-short"]/span[@class="stab unstable"]' \ +// 'Experimental' +// @matches issue_32374/index.html '//*[@class="docblock-short"]/text()' 'Docs' // @has issue_32374/struct.T.html '//*[@class="stab deprecated"]' \ // 'Deprecated since 1.0.0: text' |
