summary refs log tree commit diff
path: root/tests/rustdoc/extern/extern-html-fallback.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/extern/extern-html-fallback.rs')
-rw-r--r--tests/rustdoc/extern/extern-html-fallback.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc/extern/extern-html-fallback.rs b/tests/rustdoc/extern/extern-html-fallback.rs
new file mode 100644
index 00000000000..ddac9bf713c
--- /dev/null
+++ b/tests/rustdoc/extern/extern-html-fallback.rs
@@ -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;