Skip to content

Commit 052d40a

Browse files
Add regression test for #131946
1 parent 1d2f911 commit 052d40a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Checks that footnote references in footnote definitions are correctly generated.
2+
// Regression test for <https://github.com/rust-lang/rust/issues/131946>.
3+
4+
#![crate_name = "foo"]
5+
6+
//@ has 'foo/index.html'
7+
//@ has - '//*[@class="docblock"]/p/sup[@id="fnref1"]/a[@href="#fn1"]' '1'
8+
//@ has - '//li[@id="fn1"]/p' 'meow'
9+
//@ has - '//li[@id="fn1"]/p/sup[@id="fnref2"]/a[@href="#fn2"]' '2'
10+
//@ has - '//li[@id="fn1"]//a[@href="#fn2"]' '2'
11+
//@ has - '//li[@id="fn2"]/p' 'uwu'
12+
//@ has - '//li[@id="fn2"]/p/sup[@id="fnref1"]/a[@href="#fn1"]' '1'
13+
//@ has - '//li[@id="fn2"]//a[@href="#fn1"]' '1'
14+
15+
//! # footnote-hell
16+
//!
17+
//! Hello [^a].
18+
//!
19+
//! [^a]: meow [^b]
20+
//! [^b]: uwu [^a]

0 commit comments

Comments
 (0)