Skip to content

Commit

Permalink
Add regression test for #131946
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 14, 2024
1 parent 1d2f911 commit 052d40a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/rustdoc/footnote-reference-in-footnote-def.rs
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 052d40a

Please sign in to comment.