Skip to content

Commit

Permalink
Use XPATH notation to match against flattened nodes
Browse files Browse the repository at this point in the history
The generated code would look like `<code>impl <a href="...">Foo</a></code>`
which the plain text matcher doesn't match. But by using the XPATH notation, the
nodes are flattened and we can correctly assert that `impl Foo` does not occur
in the generated docs.
  • Loading branch information
Munksgaard committed Oct 10, 2018
1 parent 28596ad commit e8bc04e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/rustdoc/hidden-methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ pub mod hidden {

// @has foo/struct.Foo.html
// @!has - 'Methods'
// @!has - 'impl Foo'
// @!has - '//code' 'impl Foo'
// @!has - 'this_should_be_hidden'
pub use hidden::Foo;

// @has foo/struct.Bar.html
// @!has - 'Methods'
// @!has - 'impl Bar'
// @!has - '//code' 'impl Bar'
// @!has - 'this_should_be_hidden'
pub use hidden::Bar;

0 comments on commit e8bc04e

Please sign in to comment.