Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 548b6e1

Browse files
committed
add tests for behavior in rfc#3662
* Adds tests for the behavior from rfc#3662 in `tests/rustdoc/`
1 parent 2e1cba6 commit 548b6e1

File tree

41 files changed

+501
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+501
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ doc-flags:--merge=shared
2+
//@ doc-flags:--enable-index-page
3+
//@ doc-flags:-Zunstable-options
4+
5+
pub struct Quebec;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ aux-build:quebec.rs
2+
//@ build-aux-docs
3+
//@ doc-flags:--merge=shared
4+
//@ doc-flags:--enable-index-page
5+
//@ doc-flags:-Zunstable-options
6+
7+
extern crate quebec;
8+
pub trait Tango {}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//@ aux-build:tango.rs
2+
//@ build-aux-docs
3+
//@ doc-flags:--merge=shared
4+
//@ doc-flags:--enable-index-page
5+
//@ doc-flags:-Zunstable-options
6+
7+
//@ has index.html
8+
//@ has index.html '//h1' 'List of all crates'
9+
//@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec'
10+
//@ has index.html '//ul[@class="all-items"]//a[@href="sierra/index.html"]' 'sierra'
11+
//@ has index.html '//ul[@class="all-items"]//a[@href="tango/index.html"]' 'tango'
12+
//@ has quebec/struct.Quebec.html
13+
//@ has sierra/struct.Sierra.html
14+
//@ has tango/trait.Tango.html
15+
//@ hasraw sierra/struct.Sierra.html 'Tango'
16+
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
17+
//@ hasraw search-index.js 'Tango'
18+
//@ hasraw search-index.js 'Sierra'
19+
//@ hasraw search-index.js 'Quebec'
20+
21+
// similar to cargo-workflow-transitive, but we use --merge=read-write,
22+
// which is the default.
23+
extern crate tango;
24+
pub struct Sierra;
25+
impl tango::Tango for Sierra {}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@ unique-doc-out-dir
2+
//@ doc-flags:--merge=none
3+
//@ doc-flags:--parts-out-dir=info/doc.parts/quebec
4+
//@ doc-flags:--enable-index-page
5+
//@ doc-flags:-Zunstable-options
6+
7+
pub struct Quebec;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ aux-build:sierra.rs
2+
//@ build-aux-docs
3+
//@ unique-doc-out-dir
4+
//@ doc-flags:--merge=none
5+
//@ doc-flags:--parts-out-dir=info/doc.parts/romeo
6+
//@ doc-flags:--enable-index-page
7+
//@ doc-flags:-Zunstable-options
8+
9+
extern crate sierra;
10+
pub type Romeo = sierra::Sierra;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ aux-build:tango.rs
2+
//@ build-aux-docs
3+
//@ unique-doc-out-dir
4+
//@ doc-flags:--merge=none
5+
//@ doc-flags:--parts-out-dir=info/doc.parts/sierra
6+
//@ doc-flags:--enable-index-page
7+
//@ doc-flags:-Zunstable-options
8+
9+
extern crate tango;
10+
pub struct Sierra;
11+
impl tango::Tango for Sierra {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ aux-build:quebec.rs
2+
//@ build-aux-docs
3+
//@ unique-doc-out-dir
4+
//@ doc-flags:--merge=none
5+
//@ doc-flags:--parts-out-dir=info/doc.parts/tango
6+
//@ doc-flags:--enable-index-page
7+
//@ doc-flags:-Zunstable-options
8+
9+
extern crate quebec;
10+
pub trait Tango {}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//@ aux-build:tango.rs
2+
//@ aux-build:romeo.rs
3+
//@ aux-build:quebec.rs
4+
//@ aux-build:sierra.rs
5+
//@ build-aux-docs
6+
//@ doc-flags:--merge=finalize
7+
//@ doc-flags:--include-parts-dir=info/doc.parts/tango
8+
//@ doc-flags:--include-parts-dir=info/doc.parts/romeo
9+
//@ doc-flags:--include-parts-dir=info/doc.parts/quebec
10+
//@ doc-flags:--include-parts-dir=info/doc.parts/sierra
11+
//@ doc-flags:--enable-index-page
12+
//@ doc-flags:-Zunstable-options
13+
14+
//@ has index.html '//h1' 'List of all crates'
15+
//@ has index.html
16+
//@ has index.html '//ul[@class="all-items"]//a[@href="indigo/index.html"]' 'indigo'
17+
//@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec'
18+
//@ has index.html '//ul[@class="all-items"]//a[@href="romeo/index.html"]' 'romeo'
19+
//@ has index.html '//ul[@class="all-items"]//a[@href="sierra/index.html"]' 'sierra'
20+
//@ has index.html '//ul[@class="all-items"]//a[@href="tango/index.html"]' 'tango'
21+
//@ !has quebec/struct.Quebec.html
22+
//@ !has romeo/type.Romeo.html
23+
//@ !has sierra/struct.Sierra.html
24+
//@ !has tango/trait.Tango.html
25+
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
26+
//@ hasraw search-index.js 'Quebec'
27+
//@ hasraw search-index.js 'Romeo'
28+
//@ hasraw search-index.js 'Sierra'
29+
//@ hasraw search-index.js 'Tango'
30+
//@ has type.impl/sierra/struct.Sierra.js
31+
//@ hasraw type.impl/sierra/struct.Sierra.js 'Tango'
32+
//@ hasraw type.impl/sierra/struct.Sierra.js 'Romeo'
33+
34+
// document everything in the default mode, there are separate out
35+
// directories that are linked together
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ unique-doc-out-dir
2+
//@ doc-flags:--merge=none
3+
//@ doc-flags:--enable-index-page
4+
//@ doc-flags:-Zunstable-options
5+
6+
pub struct Quebec;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ aux-build:quebec.rs
2+
//@ build-aux-docs
3+
//@ unique-doc-out-dir
4+
//@ doc-flags:--merge=none
5+
//@ doc-flags:--enable-index-page
6+
//@ doc-flags:-Zunstable-options
7+
8+
extern crate quebec;
9+
pub trait Tango {}

0 commit comments

Comments
 (0)