File tree 4 files changed +22
-12
lines changed
4 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 6
6
7
7
// We first check that the headers in the `.top-doc` doc block still have their
8
8
// bottom border.
9
- assert-text: (".top-doc .docblock > h3", "Hello")
9
+ assert-text: (".top-doc .docblock > h3", "§ Hello")
10
10
assert-css: (
11
11
".top-doc .docblock > h3",
12
12
{"border-bottom": "1px solid #d2d2d2"},
Original file line number Diff line number Diff line change 5
5
pub struct Foo ;
6
6
7
7
impl Foo {
8
- // @has - '//*[@id="examples"]//a' 'Examples'
9
- // @has - '//*[@id="panics"]//a' 'Panics'
8
+ // @has - '//*[@id="examples"]' 'Examples'
9
+ // @has - '//*[@id="examples"]/a[@href="#examples"]' '§'
10
+ // @has - '//*[@id="panics"]' 'Panics'
11
+ // @has - '//*[@id="panics"]/a[@href="#panics"]' '§'
10
12
/// # Examples
11
13
/// # Panics
12
14
pub fn bar ( ) { }
13
15
14
- // @has - '//*[@id="examples-1"]//a' 'Examples'
16
+ // @has - '//*[@id="examples-1"]' 'Examples'
17
+ // @has - '//*[@id="examples-1"]/a[@href="#examples-1"]' '§'
15
18
/// # Examples
16
19
pub fn bar_1 ( ) { }
17
20
18
- // @has - '//*[@id="examples-2"]//a' 'Examples'
19
- // @has - '//*[@id="panics-1"]//a' 'Panics'
21
+ // @has - '//*[@id="examples-2"]' 'Examples'
22
+ // @has - '//*[@id="examples-2"]/a[@href="#examples-2"]' '§'
23
+ // @has - '//*[@id="panics-1"]' 'Panics'
24
+ // @has - '//*[@id="panics-1"]/a[@href="#panics-1"]' '§'
20
25
/// # Examples
21
26
/// # Panics
22
27
pub fn bar_2 ( ) { }
Original file line number Diff line number Diff line change
1
+ // It actually checks that the link is kept in the headings as expected now.
2
+
1
3
#![ crate_name = "foo" ]
2
4
3
5
// @has foo/fn.foo.html
4
- // @!has - '//a[@href="http://a.a"]' ''
5
- // @has - '//a[@href="#implementing-stuff-somewhere"]' 'Implementing stuff somewhere'
6
- // @has - '//a[@href="#another-one-urg"]' 'Another one urg'
6
+ // @has - '//a[@href="http://a.a"]' 'stuff'
7
+ // @has - '//*[@id="implementing-stuff-somewhere"]' 'Implementing stuff somewhere'
8
+ // @has - '//a[@href="http://b.b"]' 'one'
9
+ // @has - '//*[@id="another-one-urg"]' 'Another one urg'
7
10
8
11
/// fooo
9
12
///
13
16
///
14
17
/// # Another [one][two] urg
15
18
///
16
- /// [two]: http://a.a
19
+ /// [two]: http://b.b
17
20
pub fn foo ( ) { }
Original file line number Diff line number Diff line change 2
2
3
3
// @has foo/index.html '//*[@class="desc docblock-short"]' 'fooo'
4
4
// @!has foo/index.html '//*[@class="desc docblock-short"]/h1' 'fooo'
5
- // @has foo/fn.foo.html '//h2[@id="fooo"]/a[@href="#fooo"]' 'fooo'
6
5
6
+ // @has foo/fn.foo.html '//h2[@id="fooo"]' 'fooo'
7
+ // @has foo/fn.foo.html '//h2[@id="fooo"]/a[@href="#fooo"]' '§'
7
8
/// # fooo
8
9
///
9
10
/// foo
10
11
pub fn foo ( ) { }
11
12
12
13
// @has foo/index.html '//*[@class="desc docblock-short"]' 'mooood'
13
14
// @!has foo/index.html '//*[@class="desc docblock-short"]/h2' 'mooood'
14
- // @has foo/foo/index.html '//h3[@id="mooood"]/a[@href="#mooood"]' 'mooood'
15
15
16
+ // @has foo/foo/index.html '//h3[@id="mooood"]' 'mooood'
17
+ // @has foo/foo/index.html '//h3[@id="mooood"]/a[@href="#mooood"]' '§'
16
18
/// ## mooood
17
19
///
18
20
/// foo mod
You can’t perform that action at this time.
0 commit comments