Skip to content

Commit

Permalink
Add staged_api for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsha committed Jan 17, 2022
1 parent 43b9268 commit ae99e23
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/rustdoc-gui/headings.goml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,16 @@ assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"})
assert-css: ("h3#top-doc-prose-sub-heading", {"font-size": "18.4px"})
assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"})

goto: file://|DOC_PATH|/staged_api/struct.Foo.html
show-text: true
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
assert-css: (".since", {"color": "rgb(128, 128, 128)"})

local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
reload:
assert-css: (".since", {"color": "rgb(128, 128, 128)"})

local-storage: {"rustdoc-theme": "ayu", "rustdoc-use-system-theme": "false"}
reload:
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
7 changes: 7 additions & 0 deletions src/test/rustdoc-gui/src/staged_api/Cargo.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3

[[package]]
name = "staged_api"
version = "0.1.0"
11 changes: 11 additions & 0 deletions src/test/rustdoc-gui/src/staged_api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "staged_api"
version = "0.1.0"
edition = "2021"

[lib]
path = "lib.rs"

[features]
default = ["some_feature"]
some_feature = []
10 changes: 10 additions & 0 deletions src/test/rustdoc-gui/src/staged_api/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(staged_api)]
#![stable(feature = "some_feature", since = "1.3.5")]

#[stable(feature = "some_feature", since = "1.3.5")]
pub struct Foo {}

impl Foo {
#[stable(feature = "some_feature", since = "1.3.5")]
pub fn bar() {}
}

0 comments on commit ae99e23

Please sign in to comment.