Skip to content

Commit 5f8dc0d

Browse files
committed
Fix unneeded-trait-implementations-title test
The `@!has` command does not support specifying just a PATH and an XPATH. That means that the previous test searched for the literal string `//h2[@id="implementations"]` within the generated output, which obviously didn't exist. Even after adding a trait implementation, the test still passed. The correct way to check for the existence of a DOM element with the id `implementations` is to use the `@count` keyword.
1 parent 46ccce0 commit 5f8dc0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/rustdoc/unneeded-trait-implementations-title.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
pub struct Bar;
1414

15-
// @!has foo/struct.Bar.html '//*[@id="implementations"]'
15+
// @count foo/struct.Bar.html '//*[@id="implementations"]' 0

0 commit comments

Comments
 (0)