about summary refs log tree commit diff
path: root/tests/rustdoc/footnote-reference-in-footnote-def.rs
blob: 504d0bdb8f79fc6eda4722dcd7fc4f0c6ba149b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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-2"]/a[@href="#fn1"]' '1'
//@ has - '//li[@id="fn2"]//a[@href="#fn1"]' '1'

//! # footnote-hell
//!
//! Hello [^a].
//!
//! [^a]: meow [^b]
//! [^b]: uwu [^a]