Skip to content

Commit

Permalink
Update tests for linking to transient dependencies items
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 22, 2024
1 parent 4d6ae88 commit e4b0aaa
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/testsuite/rustdoc_extern_html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,9 @@ fn alt_registry() {
.run();
let queen = p.read_file("target/doc/foo/fn.queen.html");
assert!(queen.contains(r#"href="https://example.com/bar/1.0.0/bar/struct.Queen.html""#));
// The king example fails to link. Rustdoc seems to want the origin crate
// name (baz) for re-exports. There are many issues in the issue tracker
// for rustdoc re-exports, so I'm not sure, but I think this is maybe a
// rustdoc issue. Alternatively, Cargo could provide mappings for all
// transitive dependencies to fix this.

let king = p.read_file("target/doc/foo/fn.king.html");
assert!(king.contains(r#"-> King"#));
assert!(king.contains(r#"href="https://example.com/baz/1.0.0/baz/struct.King.html""#));

let gold = p.read_file("target/doc/foo/fn.gold.html");
assert!(gold.contains(r#"href="https://docs.rs/grimm/1.0.0/grimm/struct.Gold.html""#));
Expand Down Expand Up @@ -413,13 +409,9 @@ fn alt_sparse_registry() {
.run();
let queen = p.read_file("target/doc/foo/fn.queen.html");
assert!(queen.contains(r#"href="https://example.com/bar/1.0.0/bar/struct.Queen.html""#));
// The king example fails to link. Rustdoc seems to want the origin crate
// name (baz) for re-exports. There are many issues in the issue tracker
// for rustdoc re-exports, so I'm not sure, but I think this is maybe a
// rustdoc issue. Alternatively, Cargo could provide mappings for all
// transitive dependencies to fix this.

let king = p.read_file("target/doc/foo/fn.king.html");
assert!(king.contains(r#"-> King"#));
assert!(king.contains(r#"href="https://example.com/baz/1.0.0/baz/struct.King.html""#));

let gold = p.read_file("target/doc/foo/fn.gold.html");
assert!(gold.contains(r#"href="https://docs.rs/grimm/1.0.0/grimm/struct.Gold.html""#));
Expand Down

0 comments on commit e4b0aaa

Please sign in to comment.