diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-14 17:01:29 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-14 17:01:29 +0100 |
| commit | 052d40adb386c89439135c383df673307180b626 (patch) | |
| tree | 1926a4c15790f2055ee99143452f8484a3c1fad4 | |
| parent | 1d2f9118fe62e5ca1436f4d9de8869bc4c44fca9 (diff) | |
| download | rust-052d40adb386c89439135c383df673307180b626.tar.gz rust-052d40adb386c89439135c383df673307180b626.zip | |
Add regression test for #131946
| -rw-r--r-- | tests/rustdoc/footnote-reference-in-footnote-def.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc/footnote-reference-in-footnote-def.rs b/tests/rustdoc/footnote-reference-in-footnote-def.rs new file mode 100644 index 00000000000..db3f9a59ef8 --- /dev/null +++ b/tests/rustdoc/footnote-reference-in-footnote-def.rs @@ -0,0 +1,20 @@ +// Checks that footnote references in footnote definitions are correctly generated. +// Regression test for <https://github.com/rust-lang/rust/issues/131946>. + +#![crate_name = "foo"] + +//@ has 'foo/index.html' +//@ has - '//*[@class="docblock"]/p/sup[@id="fnref1"]/a[@href="#fn1"]' '1' +//@ has - '//li[@id="fn1"]/p' 'meow' +//@ has - '//li[@id="fn1"]/p/sup[@id="fnref2"]/a[@href="#fn2"]' '2' +//@ has - '//li[@id="fn1"]//a[@href="#fn2"]' '2' +//@ has - '//li[@id="fn2"]/p' 'uwu' +//@ has - '//li[@id="fn2"]/p/sup[@id="fnref1"]/a[@href="#fn1"]' '1' +//@ has - '//li[@id="fn2"]//a[@href="#fn1"]' '1' + +//! # footnote-hell +//! +//! Hello [^a]. +//! +//! [^a]: meow [^b] +//! [^b]: uwu [^a] |
