Test renamed crates in rustdoc
This commit is contained in:
parent
8a0f976047
commit
0813cc9dcf
2 changed files with 23 additions and 0 deletions
9
tests/rustdoc/extern/extern-html-alias.rs
vendored
Normal file
9
tests/rustdoc/extern/extern-html-alias.rs
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
//@ compile-flags:-Z unstable-options --extern-html-root-url externs_name=https://renamed.example.com --extern-html-root-url empty=https://bad.invalid
|
||||
//@ aux-crate:externs_name=empty.rs
|
||||
//@ edition: 2018
|
||||
|
||||
extern crate externs_name as renamed;
|
||||
|
||||
//@ has extern_html_alias/index.html
|
||||
//@ has - '//a/@href' 'https://renamed.example.com/empty/index.html'
|
||||
pub use renamed as yet_different_name;
|
||||
14
tests/rustdoc/extern/extern-html-fallback.rs
vendored
Normal file
14
tests/rustdoc/extern/extern-html-fallback.rs
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//@ compile-flags:-Z unstable-options --extern-html-root-url yet_another_name=https://bad.invalid --extern-html-root-url renamed_privately=https://bad.invalid --extern-html-root-url renamed_locally=https://bad.invalid --extern-html-root-url empty=https://localhost
|
||||
//@ aux-crate:externs_name=empty.rs
|
||||
//@ edition: 2018
|
||||
|
||||
mod m {
|
||||
pub extern crate externs_name as renamed_privately;
|
||||
}
|
||||
|
||||
// renaming within the crate's source code is not supposed to affect CLI flags
|
||||
extern crate externs_name as renamed_locally;
|
||||
|
||||
//@ has extern_html_fallback/index.html
|
||||
//@ has - '//a/@href' 'https://localhost/empty/index.html'
|
||||
pub use crate::renamed_locally as yet_another_name;
|
||||
Loading…
Add table
Add a link
Reference in a new issue