File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test checks the intra doc links to code examples.
2+ go-to: "file://" + |DOC_PATH| + "/scrape_examples/index.html"
3+
4+ assert-attribute: (
5+ "//a[text()='check']",
6+ {
7+ "href": "../src/check/check.rs.html",
8+ "title": "Example check",
9+ },
10+ )
11+ assert-attribute: (
12+ "//a[text()='check/check.rs']",
13+ {
14+ "href": "../src/check/check.rs.html",
15+ "title": "Example check",
16+ },
17+ )
18+ assert-attribute: (
19+ "//a[text()='check/sub.rs']",
20+ {
21+ "href": "../src/check/sub.rs.html",
22+ "title": "Example check",
23+ },
24+ )
25+ // We now click on the link to ensure it works.
26+ click: "//a[text()='check/sub.rs']"
27+ wait-for-text: (".main-heading h1", "check/sub.rs")
Original file line number Diff line number Diff line change 1+ mod sub;
2+
13fn main ( ) {
4+ sub:: foo ( ) ;
5+
26 for i in 0 ..9 {
37 println ! ( "hello world!" ) ;
48 println ! ( "hello world!" ) ;
Original file line number Diff line number Diff line change 1+ pub fn foo ( ) { }
Original file line number Diff line number Diff line change 11//@ run-flags:-Zrustdoc-scrape-examples
2+
3+ //! [example@check] [example@check/check.rs] [example@check/sub.rs]
4+
25/// # Examples
36///
47/// ```
You can’t perform that action at this time.
0 commit comments