-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
1 parent
fdd7a0f
commit b528d6e
Showing
89 changed files
with
807 additions
and
195 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
tests/rustdoc/cross-crate-info/cargo-transitive-no-index/auxiliary/quebec.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//@ unique-doc-out-dir | ||
pub struct Quebec; |
4 changes: 0 additions & 4 deletions
4
tests/rustdoc/cross-crate-info/cargo-transitive-no-index/auxiliary/t.rs
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
tests/rustdoc/cross-crate-info/cargo-transitive-no-index/auxiliary/tango.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//@ aux-build:quebec.rs | ||
//@ build-aux-docs | ||
//@ unique-doc-out-dir | ||
extern crate quebec; | ||
pub trait Tango {} |
16 changes: 0 additions & 16 deletions
16
tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
tests/rustdoc/cross-crate-info/cargo-transitive-no-index/sierra.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//@ aux-build:tango.rs | ||
//@ build-aux-docs | ||
//@ !has index.html | ||
//@ !has quebec/struct.Quebec.html | ||
//@ !has tango/trait.Tango.html | ||
//@ has sierra/struct.Sierra.html | ||
//@ hasraw sierra/struct.Sierra.html 'Tango' | ||
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html' | ||
//@ !hasraw search-index.js 'Tango' | ||
//@ !hasraw search-index.js 'Quebec' | ||
//@ hasraw search-index.js 'Sierra' | ||
|
||
// We use the regular and transitive dependencies.Both should appear in | ||
// the item docs for the final crate. The index page is not generated, | ||
// however. | ||
extern crate tango; | ||
pub struct Sierra; | ||
impl tango::Tango for Sierra {} |
5 changes: 5 additions & 0 deletions
5
tests/rustdoc/cross-crate-info/cargo-transitive-read-write/auxiliary/quebec.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//@ doc-flags:--merge=shared | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
pub struct Quebec; |
8 changes: 8 additions & 0 deletions
8
tests/rustdoc/cross-crate-info/cargo-transitive-read-write/auxiliary/tango.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@ aux-build:quebec.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--merge=shared | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate quebec; | ||
pub trait Tango {} |
25 changes: 25 additions & 0 deletions
25
tests/rustdoc/cross-crate-info/cargo-transitive-read-write/sierra.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//@ aux-build:tango.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--merge=shared | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
//@ has index.html | ||
//@ has index.html '//h1' 'List of all crates' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="sierra/index.html"]' 'sierra' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="tango/index.html"]' 'tango' | ||
//@ has quebec/struct.Quebec.html | ||
//@ has sierra/struct.Sierra.html | ||
//@ has tango/trait.Tango.html | ||
//@ hasraw sierra/struct.Sierra.html 'Tango' | ||
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html' | ||
//@ hasraw search-index.js 'Tango' | ||
//@ hasraw search-index.js 'Sierra' | ||
//@ hasraw search-index.js 'Quebec' | ||
|
||
// similar to cargo-workflow-transitive, but we use --merge=read-write, | ||
// which is the default. | ||
extern crate tango; | ||
pub struct Sierra; | ||
impl tango::Tango for Sierra {} |
2 changes: 1 addition & 1 deletion
2
...rate-info/cargo-transitive/auxiliary/q.rs → ...info/cargo-transitive/auxiliary/quebec.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//@ build-aux-docs | ||
//@ unique-doc-out-dir | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
|
5 changes: 3 additions & 2 deletions
5
...ss-crate-info/kitchen-sink/auxiliary/t.rs → ...-info/cargo-transitive/auxiliary/tango.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
//@ aux-build:q.rs | ||
//@ aux-build:quebec.rs | ||
//@ build-aux-docs | ||
//@ unique-doc-out-dir | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate q; | ||
extern crate quebec; | ||
pub trait Tango {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//@ aux-build:tango.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
//@ has index.html | ||
//@ has index.html '//h1' 'List of all crates' | ||
//@ !has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec' | ||
//@ !has index.html '//ul[@class="all-items"]//a[@href="tango/index.html"]' 'tango' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="sierra/index.html"]' 'sierra' | ||
//@ !has quebec/struct.Quebec.html | ||
//@ !has tango/trait.Tango.html | ||
//@ has sierra/struct.Sierra.html | ||
//@ hasraw sierra/struct.Sierra.html 'Tango' | ||
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html' | ||
//@ !hasraw search-index.js 'Tango' | ||
//@ !hasraw search-index.js 'Quebec' | ||
//@ hasraw search-index.js 'Sierra' | ||
|
||
// We use the regular and transitive dependencies. Both should appear in | ||
// the item docs for the final crate. | ||
extern crate tango; | ||
pub struct Sierra; | ||
impl tango::Tango for Sierra {} |
1 change: 0 additions & 1 deletion
1
...te-info/cargo-two-no-index/auxiliary/f.rs → ...o/cargo-two-no-index/auxiliary/foxtrot.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
//@ build-aux-docs | ||
pub trait Foxtrot {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//@ aux-build:foxtrot.rs | ||
//@ build-aux-docs | ||
//@ has echo/enum.Echo.html | ||
//@ has foxtrot/trait.Foxtrot.html | ||
//@ hasraw echo/enum.Echo.html 'Foxtrot' | ||
//@ hasraw trait.impl/foxtrot/trait.Foxtrot.js 'enum.Echo.html' | ||
//@ hasraw search-index.js 'Foxtrot' | ||
//@ hasraw search-index.js 'Echo' | ||
|
||
// document two crates in the same way that cargo does. do not provide | ||
// --enable-index-page | ||
extern crate foxtrot; | ||
pub enum Echo {} | ||
impl foxtrot::Foxtrot for Echo {} |
1 change: 0 additions & 1 deletion
1
...cross-crate-info/cargo-two/auxiliary/f.rs → ...crate-info/cargo-two/auxiliary/foxtrot.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//@ aux-build:foxtrot.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
//@ has index.html | ||
//@ has index.html '//h1' 'List of all crates' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="foxtrot/index.html"]' 'foxtrot' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="echo/index.html"]' 'echo' | ||
//@ has echo/enum.Echo.html | ||
//@ has foxtrot/trait.Foxtrot.html | ||
//@ hasraw echo/enum.Echo.html 'Foxtrot' | ||
//@ hasraw trait.impl/foxtrot/trait.Foxtrot.js 'enum.Echo.html' | ||
//@ hasraw search-index.js 'Foxtrot' | ||
//@ hasraw search-index.js 'Echo' | ||
|
||
// document two crates in the same way that cargo does, writing them both | ||
// into the same output directory | ||
extern crate foxtrot; | ||
pub enum Echo {} | ||
impl foxtrot::Foxtrot for Echo {} |
1 change: 0 additions & 1 deletion
1
...s-crate-info/index-on-last/auxiliary/f.rs → ...e-info/index-on-last/auxiliary/foxtrot.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
//@ build-aux-docs | ||
pub trait Foxtrot {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//@ aux-build:foxtrot.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
//@ has index.html | ||
//@ has index.html '//h1' 'List of all crates' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="foxtrot/index.html"]' 'foxtrot' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="echo/index.html"]' 'echo' | ||
//@ has echo/enum.Echo.html | ||
//@ has foxtrot/trait.Foxtrot.html | ||
//@ hasraw echo/enum.Echo.html 'Foxtrot' | ||
//@ hasraw trait.impl/foxtrot/trait.Foxtrot.js 'enum.Echo.html' | ||
//@ hasraw search-index.js 'Foxtrot' | ||
//@ hasraw search-index.js 'Echo' | ||
|
||
// only declare --enable-index-page to the last rustdoc invocation | ||
extern crate foxtrot; | ||
pub enum Echo {} | ||
impl foxtrot::Foxtrot for Echo {} |
7 changes: 7 additions & 0 deletions
7
tests/rustdoc/cross-crate-info/kitchen-sink-separate-dirs/auxiliary/quebec.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//@ unique-doc-out-dir | ||
//@ doc-flags:--merge=none | ||
//@ doc-flags:--parts-out-dir=info/doc.parts/quebec | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
pub struct Quebec; |
10 changes: 10 additions & 0 deletions
10
tests/rustdoc/cross-crate-info/kitchen-sink-separate-dirs/auxiliary/romeo.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//@ aux-build:sierra.rs | ||
//@ build-aux-docs | ||
//@ unique-doc-out-dir | ||
//@ doc-flags:--merge=none | ||
//@ doc-flags:--parts-out-dir=info/doc.parts/romeo | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate sierra; | ||
pub type Romeo = sierra::Sierra; |
11 changes: 11 additions & 0 deletions
11
tests/rustdoc/cross-crate-info/kitchen-sink-separate-dirs/auxiliary/sierra.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//@ aux-build:tango.rs | ||
//@ build-aux-docs | ||
//@ unique-doc-out-dir | ||
//@ doc-flags:--merge=none | ||
//@ doc-flags:--parts-out-dir=info/doc.parts/sierra | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate tango; | ||
pub struct Sierra; | ||
impl tango::Tango for Sierra {} |
10 changes: 10 additions & 0 deletions
10
tests/rustdoc/cross-crate-info/kitchen-sink-separate-dirs/auxiliary/tango.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//@ aux-build:quebec.rs | ||
//@ build-aux-docs | ||
//@ unique-doc-out-dir | ||
//@ doc-flags:--merge=none | ||
//@ doc-flags:--parts-out-dir=info/doc.parts/tango | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate quebec; | ||
pub trait Tango {} |
35 changes: 35 additions & 0 deletions
35
tests/rustdoc/cross-crate-info/kitchen-sink-separate-dirs/indigo.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//@ aux-build:sierra.rs | ||
//@ aux-build:tango.rs | ||
//@ aux-build:romeo.rs | ||
//@ aux-build:quebec.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--merge=finalize | ||
//@ doc-flags:--include-parts-dir=info/doc.parts/sierra | ||
//@ doc-flags:--include-parts-dir=info/doc.parts/tango | ||
//@ doc-flags:--include-parts-dir=info/doc.parts/romeo | ||
//@ doc-flags:--include-parts-dir=info/doc.parts/quebec | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
//@ has index.html '//h1' 'List of all crates' | ||
//@ has index.html | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="indigo/index.html"]' 'indigo' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="romeo/index.html"]' 'romeo' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="sierra/index.html"]' 'sierra' | ||
//@ has index.html '//ul[@class="all-items"]//a[@href="tango/index.html"]' 'tango' | ||
//@ !has quebec/struct.Quebec.html | ||
//@ !has romeo/type.Romeo.html | ||
//@ !has sierra/struct.Sierra.html | ||
//@ !has tango/trait.Tango.html | ||
//@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html' | ||
//@ hasraw search-index.js 'Quebec' | ||
//@ hasraw search-index.js 'Romeo' | ||
//@ hasraw search-index.js 'Sierra' | ||
//@ hasraw search-index.js 'Tango' | ||
//@ has type.impl/sierra/struct.Sierra.js | ||
//@ hasraw type.impl/sierra/struct.Sierra.js 'Tango' | ||
//@ hasraw type.impl/sierra/struct.Sierra.js 'Romeo' | ||
|
||
// document everything in the default mode, there are separate out | ||
// directories that are linked together |
1 change: 0 additions & 1 deletion
1
...ss-crate-info/kitchen-sink/auxiliary/q.rs → ...ate-info/kitchen-sink/auxiliary/quebec.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
|
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
tests/rustdoc/cross-crate-info/kitchen-sink/auxiliary/romeo.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//@ aux-build:sierra.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate sierra; | ||
pub type Romeo = sierra::Sierra; |
6 changes: 3 additions & 3 deletions
6
...ss-crate-info/kitchen-sink/auxiliary/s.rs → ...ate-info/kitchen-sink/auxiliary/sierra.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
//@ aux-build:t.rs | ||
//@ aux-build:tango.rs | ||
//@ build-aux-docs | ||
//@ doc-flags:--enable-index-page | ||
//@ doc-flags:-Zunstable-options | ||
|
||
extern crate t; | ||
extern crate tango; | ||
pub struct Sierra; | ||
impl t::Tango for Sierra {} | ||
impl tango::Tango for Sierra {} |
Oops, something went wrong.