about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-01-28 11:42:50 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-01-29 14:14:03 +0100
commit1e60cc9bd9b35c1aa63e941fad0c0326db82e366 (patch)
treecc7e819e11a0510a8256d40799437ef5ac550dc9
parent1bdeeef0d59f5539d045b65865f8b0ec7d76eed0 (diff)
downloadrust-1e60cc9bd9b35c1aa63e941fad0c0326db82e366.tar.gz
rust-1e60cc9bd9b35c1aa63e941fad0c0326db82e366.zip
Add regression test for #100638
-rw-r--r--tests/rustdoc/footnote-definition-without-blank-line-100638.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc/footnote-definition-without-blank-line-100638.rs b/tests/rustdoc/footnote-definition-without-blank-line-100638.rs
new file mode 100644
index 00000000000..b6f62c3bcba
--- /dev/null
+++ b/tests/rustdoc/footnote-definition-without-blank-line-100638.rs
@@ -0,0 +1,15 @@
+#![crate_name = "foo"]
+
+//! Reference to footnotes A[^1], B[^2] and C[^3].
+//!
+//! [^1]: Footnote A.
+//! [^2]: Footnote B.
+//! [^3]: Footnote C.
+
+// @has 'foo/index.html'
+// @has - '//*[@class="docblock"]/*[@class="footnotes"]/ol/li[@id="fn1"]/p' 'Footnote A'
+// @has - '//li[@id="fn1"]/p/a/@href' '#fnref1'
+// @has - '//*[@class="docblock"]/*[@class="footnotes"]/ol/li[@id="fn2"]/p' 'Footnote B'
+// @has - '//li[@id="fn2"]/p/a/@href' '#fnref2'
+// @has - '//*[@class="docblock"]/*[@class="footnotes"]/ol/li[@id="fn3"]/p' 'Footnote C'
+// @has - '//li[@id="fn3"]/p/a/@href' '#fnref3'