Skip to content

Commit b528d6e

Browse files
committed
add rfc#3662 tests, plus multi letter test crates
* Adds tests for the behavior in rfc#3662 * Renames single variable test crate names to multi letter crate names in tests/rustdoc/cross-crate-info (i.e. s.rs -> sierra.rs)
1 parent fdd7a0f commit b528d6e

File tree

89 files changed

+807
-195
lines changed

Some content is hidden

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

89 files changed

+807
-195
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//@ unique-doc-out-dir
2+
pub struct Quebec;

tests/rustdoc/cross-crate-info/cargo-transitive-no-index/auxiliary/t.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ aux-build:quebec.rs
2+
//@ build-aux-docs
3+
//@ unique-doc-out-dir
4+
extern crate quebec;
5+
pub trait Tango {}

tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@ aux-build:tango.rs
2+
//@ build-aux-docs
3+
//@ !has index.html
4+
//@ !has quebec/struct.Quebec.html
5+
//@ !has tango/trait.Tango.html
6+
//@ has sierra/struct.Sierra.html
7+
//@ hasraw sierra/struct.Sierra.html 'Tango'
8+
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
9+
//@ !hasraw search-index.js 'Tango'
10+
//@ !hasraw search-index.js 'Quebec'
11+
//@ hasraw search-index.js 'Sierra'
12+
13+
// We use the regular and transitive dependencies.Both should appear in
14+
// the item docs for the final crate. The index page is not generated,
15+
// however.
16+
extern crate tango;
17+
pub struct Sierra;
18+
impl tango::Tango for Sierra {}
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 {}

tests/rustdoc/cross-crate-info/cargo-transitive/auxiliary/q.rs renamed to tests/rustdoc/cross-crate-info/cargo-transitive/auxiliary/quebec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ build-aux-docs
1+
//@ unique-doc-out-dir
22
//@ doc-flags:--enable-index-page
33
//@ doc-flags:-Zunstable-options
44

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
//@ aux-build:q.rs
1+
//@ aux-build:quebec.rs
22
//@ build-aux-docs
3+
//@ unique-doc-out-dir
34
//@ doc-flags:--enable-index-page
45
//@ doc-flags:-Zunstable-options
56

6-
extern crate q;
7+
extern crate quebec;
78
pub trait Tango {}

0 commit comments

Comments
 (0)