about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-23 18:45:55 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-23 18:46:07 +0100
commit433f2b030b1c672bd19f38f6247d8aadce438189 (patch)
treed1725470bcdab2a3a3d2281043315f66547ed700 /src/test/rustdoc
parent454d13badf6a5d423ba1cc56d106137752db719c (diff)
Add test for anchors
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/intra-links-anchors.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/rustdoc/intra-links-anchors.rs b/src/test/rustdoc/intra-links-anchors.rs
new file mode 100644
index 00000000000..f554e16b4f4
--- /dev/null
+++ b/src/test/rustdoc/intra-links-anchors.rs
@@ -0,0 +1,12 @@
+/// I want...
+///
+/// # Anchor!
+pub struct Something;
+
+// @has intra_links_anchors/struct.SomeOtherType.html
+// @has - '//a/@href' '../intra_links_anchors/struct.Something.html#Anchor!'
+
+/// I want...
+///
+/// To link to [Something#Anchor!]
+pub struct SomeOtherType;