about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorPhilip Munksgaard <pmunksgaard@gmail.com>2018-10-10 21:04:52 +0200
committerPhilip Munksgaard <pmunksgaard@gmail.com>2018-10-10 21:04:52 +0200
commite8bc04e1c8e0e27bcc3e5915d465ca12b0254565 (patch)
treee2721a135d012f9c6579ff5306dd083e99158468 /src/test/rustdoc
parent28596ade7169abd483410b22a4bd8703c4ccc8f7 (diff)
downloadrust-e8bc04e1c8e0e27bcc3e5915d465ca12b0254565.tar.gz
rust-e8bc04e1c8e0e27bcc3e5915d465ca12b0254565.zip
Use XPATH notation to match against flattened nodes
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.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/hidden-methods.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/rustdoc/hidden-methods.rs b/src/test/rustdoc/hidden-methods.rs
index 18f5f086cd1..aea5f44e2a7 100644
--- a/src/test/rustdoc/hidden-methods.rs
+++ b/src/test/rustdoc/hidden-methods.rs
@@ -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;